@@ -29,7 +29,6 @@ def invalidate_caches():
2929 register_line_magic , register_cell_magic ,
3030 register_line_cell_magic )
3131from IPython .core .magics import execution , script
32- from IPython .core .magics .execution import globlist
3332from IPython .nbformat .v3 .tests .nbexamples import nb0
3433from IPython .nbformat import current
3534from IPython .testing import decorators as dec
@@ -87,37 +86,6 @@ def test_magic_parse_long_options():
8786 nt .assert_true (opts ['bar' ], "bubble" )
8887
8988
90- def test_globlist ():
91- """Test glob expansion for %run magic."""
92- filenames_start_with_a = map ('a{0}' .format , range (3 ))
93- filenames_end_with_b = map ('{0}b' .format , range (3 ))
94- filenames = filenames_start_with_a + filenames_end_with_b
95-
96- with TemporaryDirectory () as td :
97- save = os .getcwdu ()
98- try :
99- os .chdir (td )
100-
101- # Create empty files
102- for fname in filenames :
103- open (os .path .join (td , fname ), 'w' ).close ()
104-
105- def assert_match (patterns , matches ):
106- # glob returns unordered list. that's why sorted is required.
107- nt .assert_equals (sorted (globlist (patterns )), sorted (matches ))
108-
109- assert_match (['*' ], filenames )
110- assert_match (['a*' ], filenames_start_with_a )
111- assert_match (['*c' ], ['*c' ])
112- assert_match (['*' , 'a*' , '*b' , '*c' ],
113- filenames
114- + filenames_start_with_a
115- + filenames_end_with_b
116- + ['*c' ])
117- finally :
118- os .chdir (save )
119-
120-
12189@dec .skip_without ('sqlite3' )
12290def doctest_hist_f ():
12391 """Test %hist -f with temporary filename.
0 commit comments