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