forked from VimPlug/jedi
test a little bit more with the not in sys path packages
This commit is contained in:
1
test/not_in_sys_path/not_in_sys_path_package/__init__.py
Normal file
1
test/not_in_sys_path/not_in_sys_path_package/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
value = 'package'
|
||||||
1
test/not_in_sys_path/not_in_sys_path_package/module.py
Normal file
1
test/not_in_sys_path/not_in_sys_path_package/module.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
value = 'package.module'
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
import not_in_sys_path
|
import not_in_sys_path
|
||||||
|
import not_in_sys_path_package
|
||||||
|
from not_in_sys_path_package import module
|
||||||
|
|
||||||
not_in_sys_path.value
|
not_in_sys_path.value
|
||||||
|
not_in_sys_path_package.value
|
||||||
|
module.value
|
||||||
|
|||||||
@@ -17,5 +17,10 @@ def test_import_not_in_sys_path():
|
|||||||
"""
|
"""
|
||||||
non-direct imports (not in sys.path)
|
non-direct imports (not in sys.path)
|
||||||
"""
|
"""
|
||||||
a = jedi.Script(path='module.py', line=3).goto_definitions()
|
a = jedi.Script(path='module.py', line=5).goto_definitions()
|
||||||
assert a[0].name == 'int'
|
assert a[0].name == 'int'
|
||||||
|
|
||||||
|
a = jedi.Script(path='module.py', line=6).goto_definitions()
|
||||||
|
assert a[0].name == 'str'
|
||||||
|
a = jedi.Script(path='module.py', line=7).goto_definitions()
|
||||||
|
assert a[0].name == 'str'
|
||||||
|
|||||||
Reference in New Issue
Block a user