1
0
forked from VimPlug/jedi

Some testing fixes that were broken with the few previous commits.

This commit is contained in:
Dave Halter
2016-12-06 18:18:53 +01:00
parent becf1027c0
commit c6248ae169
6 changed files with 15 additions and 16 deletions

View File

@@ -97,8 +97,8 @@ def test_not_importable_file():
def test_import_unique():
src = "import os; os.path"
defs = jedi.Script(src, path='example.py').goto_definitions()
defs = [d._name.parent_context for d in defs]
assert len(defs) == len(set(defs))
parent_contexts = [d._name._context for d in defs]
assert len(parent_contexts) == len(set(parent_contexts))
def test_cache_works_with_sys_path_param(tmpdir):

View File

@@ -4,8 +4,8 @@ from jedi import Script
def get_definition_and_evaluator(source):
d = Script(dedent(source)).goto_definitions()[0]
return d._name.parent_context, d._evaluator
first, = Script(dedent(source)).goto_definitions()
return first._name._context, first._evaluator
def test_function_execution():