Fix import completion issues.

This commit is contained in:
Dave Halter
2014-12-18 02:55:03 +01:00
parent f8cd3c661a
commit 1fb13837c4
4 changed files with 18 additions and 10 deletions

View File

@@ -63,7 +63,7 @@ import datetime.date
#? 21 ['import']
from import_tree.pkg import pkg
#? 22 ['import', 'mod1']
#? 22 ['mod1']
from import_tree.pkg. import mod1
#? 17 ['mod1', 'mod2', 'random', 'pkg', 'rename1', 'rename2', 'recurse_class1', 'recurse_class2']
from import_tree. import pkg

View File

@@ -74,6 +74,7 @@ def test_after_from():
completions = Script(source, column=column).completions()
assert [c.name for c in completions] == result
check('\nfrom os. ', ['path'])
check('\nfrom os ', ['import'])
check('from os ', ['import'])
check('\nfrom os import whatever', ['import'], len('from os im'))