mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-09 23:25:47 +08:00
Use project instead of sys_path parameter in tests
This commit is contained in:
1 parent
ceccbf3678
commit
4a1d9a9116
6 files changed
+42
-28
No files matched your search
@@ -97,9 +97,10 @@ def test_sub_module(Script, jedi_path):
|
||||
path.
|
||||
"""
|
||||
sys_path = [jedi_path]
|
||||
defs = Script('from jedi.api import classes; classes', sys_path=sys_path).infer()
|
||||
project = jedi.Project('.', sys_path=sys_path)
|
||||
defs = Script('from jedi.api import classes; classes', project=project).infer()
|
||||
assert [d.full_name for d in defs] == ['jedi.api.classes']
|
||||
defs = Script('import jedi.api; jedi.api', sys_path=sys_path).infer()
|
||||
defs = Script('import jedi.api; jedi.api', project=project).infer()
|
||||
assert [d.full_name for d in defs] == ['jedi.api']
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user