1
0
forked from VimPlug/jedi

Avoid failing if additional dynamic modules is defined with files that don't exist

This commit is contained in:
Dave Halter
2019-06-06 00:43:24 +02:00
parent 84eb91beaa
commit b98bf07767
2 changed files with 29 additions and 11 deletions

View File

@@ -21,3 +21,14 @@ def test_base_auto_import_modules(auto_import_json, Script):
def test_auto_import_modules_imports(auto_import_json, Script):
main, = Script('from json import tool; tool.main').goto_definitions()
assert isinstance(main._name, CompiledContextName)
def test_additional_dynamic_modules(monkeypatch, Script):
# We could add further tests, but for now it's even more important that
# this doesn't fail.
monkeypatch.setattr(
settings,
'additional_dynamic_modules',
['/foo/bar/jedi_not_existing_file.py']
)
assert not Script('def some_func(f):\n f.').completions()