@@ -123,15 +123,15 @@ def test_locate_fails_when_not_in_string(self):
123
123
def test_locate_succeeds_when_in_string (self ):
124
124
self .assertEqual (self .completer .locate (4 , "a'bc'd" ), (2 , 4 , 'bc' ))
125
125
126
- @mock .patch ('bpython.autocomplete .glob' , new = lambda text : [])
126
+ @mock .patch ('glob .glob' , new = lambda text : [])
127
127
def test_match_returns_none_if_not_in_string (self ):
128
128
self .assertEqual (self .completer .matches (2 , 'abcd' ), None )
129
129
130
- @mock .patch ('bpython.autocomplete .glob' , new = lambda text : [])
130
+ @mock .patch ('glob .glob' , new = lambda text : [])
131
131
def test_match_returns_empty_list_when_no_files (self ):
132
132
self .assertEqual (self .completer .matches (2 , '"a' ), set ())
133
133
134
- @mock .patch ('bpython.autocomplete .glob' ,
134
+ @mock .patch ('glob .glob' ,
135
135
new = lambda text : ['abcde' , 'aaaaa' ])
136
136
@mock .patch ('os.path.expanduser' , new = lambda text : text )
137
137
@mock .patch ('os.path.isdir' , new = lambda text : False )
@@ -140,7 +140,7 @@ def test_match_returns_files_when_files_exist(self):
140
140
self .assertEqual (sorted (self .completer .matches (2 , '"x' )),
141
141
['aaaaa' , 'abcde' ])
142
142
143
- @mock .patch ('bpython.autocomplete .glob' ,
143
+ @mock .patch ('glob .glob' ,
144
144
new = lambda text : ['abcde' , 'aaaaa' ])
145
145
@mock .patch ('os.path.expanduser' , new = lambda text : text )
146
146
@mock .patch ('os.path.isdir' , new = lambda text : True )
@@ -149,7 +149,7 @@ def test_match_returns_dirs_when_dirs_exist(self):
149
149
self .assertEqual (sorted (self .completer .matches (2 , '"x' )),
150
150
['aaaaa/' , 'abcde/' ])
151
151
152
- @mock .patch ('bpython.autocomplete .glob' ,
152
+ @mock .patch ('glob .glob' ,
153
153
new = lambda text : ['/expand/ed/abcde' , '/expand/ed/aaaaa' ])
154
154
@mock .patch ('os.path.expanduser' ,
155
155
new = lambda text : text .replace ('~' , '/expand/ed' ))
0 commit comments