1
0
forked from VimPlug/jedi

Use a different sys path for import completions and import type inference

Fix tests of the #1451 pull request
This commit is contained in:
Dave Halter
2019-12-01 00:10:11 +01:00
parent 1ba83414a5
commit 86071dda54
4 changed files with 19 additions and 8 deletions

View File

@@ -20,8 +20,12 @@ def builtin_test():
#? ['sqlite3']
import sqlite3
#? ['classes']
# classes is a local module that has an __init__.py and can therefore not be
# found. test can be found.
#? []
import classes
#? ['test']
import test
#? ['timedelta']
from datetime import timedel

View File

@@ -115,6 +115,8 @@ def test_find_module_not_package_zipped(Script, inference_state, environment):
def test_import_not_in_sys_path(Script):
"""
non-direct imports (not in sys.path)
This is in the end just a fallback.
"""
a = Script(path='module.py', line=5).goto_definitions()
assert a[0].name == 'int'