@@ -123,15 +123,15 @@ def test_locate_fails_when_not_in_string(self):
123123 def test_locate_succeeds_when_in_string (self ):
124124 self .assertEqual (self .completer .locate (4 , "a'bc'd" ), (2 , 4 , 'bc' ))
125125
126- @mock .patch ('glob.glob ' , new = lambda text : [])
126+ @mock .patch ('glob.iglob ' , new = lambda text : [])
127127 def test_match_returns_none_if_not_in_string (self ):
128128 self .assertEqual (self .completer .matches (2 , 'abcd' ), None )
129129
130- @mock .patch ('glob.glob ' , new = lambda text : [])
130+ @mock .patch ('glob.iglob ' , new = lambda text : [])
131131 def test_match_returns_empty_list_when_no_files (self ):
132132 self .assertEqual (self .completer .matches (2 , '"a' ), set ())
133133
134- @mock .patch ('glob.glob ' ,
134+ @mock .patch ('glob.iglob ' ,
135135 new = lambda text : ['abcde' , 'aaaaa' ])
136136 @mock .patch ('os.path.expanduser' , new = lambda text : text )
137137 @mock .patch ('os.path.isdir' , new = lambda text : False )
@@ -140,7 +140,7 @@ def test_match_returns_files_when_files_exist(self):
140140 self .assertEqual (sorted (self .completer .matches (2 , '"x' )),
141141 ['aaaaa' , 'abcde' ])
142142
143- @mock .patch ('glob.glob ' ,
143+ @mock .patch ('glob.iglob ' ,
144144 new = lambda text : ['abcde' , 'aaaaa' ])
145145 @mock .patch ('os.path.expanduser' , new = lambda text : text )
146146 @mock .patch ('os.path.isdir' , new = lambda text : True )
@@ -149,7 +149,7 @@ def test_match_returns_dirs_when_dirs_exist(self):
149149 self .assertEqual (sorted (self .completer .matches (2 , '"x' )),
150150 ['aaaaa/' , 'abcde/' ])
151151
152- @mock .patch ('glob.glob ' ,
152+ @mock .patch ('glob.iglob ' ,
153153 new = lambda text : ['/expand/ed/abcde' , '/expand/ed/aaaaa' ])
154154 @mock .patch ('os.path.expanduser' ,
155155 new = lambda text : text .replace ('~' , '/expand/ed' ))
0 commit comments