forked from VimPlug/jedi
Fix tests
This commit is contained in:
@@ -166,10 +166,11 @@ def _iter_modules(paths, prefix=''):
|
|||||||
for path in paths:
|
for path in paths:
|
||||||
importer = pkgutil.get_importer(path)
|
importer = pkgutil.get_importer(path)
|
||||||
|
|
||||||
if importer.path is None or not os.path.isdir(importer.path):
|
if importer is None or importer.path is None or not os.path.isdir(importer.path):
|
||||||
return
|
return
|
||||||
|
|
||||||
yielded = {}
|
yielded = {}
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
try:
|
try:
|
||||||
filenames = os.listdir(importer.path)
|
filenames = os.listdir(importer.path)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ def test_namespace_package_in_multiple_directories_autocompletion():
|
|||||||
|
|
||||||
script = jedi.Script(sys_path=sys_path, source=CODE)
|
script = jedi.Script(sys_path=sys_path, source=CODE)
|
||||||
compl = script.completions()
|
compl = script.completions()
|
||||||
assert set(c.name for c in compl) == {'ns1_file', 'ns2_file'}
|
assert set(c.name for c in compl) == set(['ns1_file', 'ns2_file'])
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif('sys.version_info[:2] < (3,4)')
|
@pytest.mark.skipif('sys.version_info[:2] < (3,4)')
|
||||||
|
|||||||
Reference in New Issue
Block a user