@@ -316,24 +316,22 @@ def test_simple_global_complete(self):
316
316
['def' , 'del' , 'delattr(' , 'dict(' , 'dir(' ,
317
317
'divmod(' ])
318
318
319
- @unittest .skip ("disabled while non-simple completion is disabled" )
320
319
def test_substring_global_complete (self ):
321
320
self .repl = FakeRepl ({'autocomplete_mode' : autocomplete .SUBSTRING })
322
321
self .set_input_line ("time" )
323
322
324
323
self .assertTrue (self .repl .complete ())
325
- self .assertTrue (hasattr (self .repl .completer , 'matches' ))
326
- self .assertEqual (self .repl .completer .matches ,
324
+ self .assertTrue (hasattr (self .repl .matches_iter , 'matches' ))
325
+ self .assertEqual (self .repl .matches_iter .matches ,
327
326
['RuntimeError(' , 'RuntimeWarning(' ])
328
327
329
- @unittest .skip ("disabled while non-simple completion is disabled" )
330
328
def test_fuzzy_global_complete (self ):
331
329
self .repl = FakeRepl ({'autocomplete_mode' : autocomplete .FUZZY })
332
330
self .set_input_line ("doc" )
333
331
334
332
self .assertTrue (self .repl .complete ())
335
- self .assertTrue (hasattr (self .repl .completer , 'matches' ))
336
- self .assertEqual (self .repl .completer .matches ,
333
+ self .assertTrue (hasattr (self .repl .matches_iter , 'matches' ))
334
+ self .assertEqual (self .repl .matches_iter .matches ,
337
335
['UnboundLocalError(' , '__doc__' ])
338
336
339
337
# 2. Attribute tests
@@ -349,7 +347,6 @@ def test_simple_attribute_complete(self):
349
347
self .assertTrue (hasattr (self .repl .matches_iter , 'matches' ))
350
348
self .assertEqual (self .repl .matches_iter .matches , ['Foo.bar' ])
351
349
352
- @unittest .skip ("disabled while non-simple completion is disabled" )
353
350
def test_substring_attribute_complete (self ):
354
351
self .repl = FakeRepl ({'autocomplete_mode' : autocomplete .SUBSTRING })
355
352
self .set_input_line ("Foo.az" )
@@ -359,10 +356,9 @@ def test_substring_attribute_complete(self):
359
356
self .repl .push (line )
360
357
361
358
self .assertTrue (self .repl .complete ())
362
- self .assertTrue (hasattr (self .repl .completer , 'matches' ))
363
- self .assertEqual (self .repl .completer .matches , ['Foo.baz' ])
359
+ self .assertTrue (hasattr (self .repl .matches_iter , 'matches' ))
360
+ self .assertEqual (self .repl .matches_iter .matches , ['Foo.baz' ])
364
361
365
- @unittest .skip ("disabled while non-simple completion is disabled" )
366
362
def test_fuzzy_attribute_complete (self ):
367
363
self .repl = FakeRepl ({'autocomplete_mode' : autocomplete .FUZZY })
368
364
self .set_input_line ("Foo.br" )
@@ -372,8 +368,8 @@ def test_fuzzy_attribute_complete(self):
372
368
self .repl .push (line )
373
369
374
370
self .assertTrue (self .repl .complete ())
375
- self .assertTrue (hasattr (self .repl .completer , 'matches' ))
376
- self .assertEqual (self .repl .completer .matches , ['Foo.bar' ])
371
+ self .assertTrue (hasattr (self .repl .matches_iter , 'matches' ))
372
+ self .assertEqual (self .repl .matches_iter .matches , ['Foo.bar' ])
377
373
378
374
# 3. Edge Cases
379
375
def test_updating_namespace_complete (self ):
0 commit comments