mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +08:00
fix a few small issues that remained in the tests
This commit is contained in:
@@ -34,7 +34,7 @@ def test_follow_import_incomplete():
|
|||||||
|
|
||||||
# incomplete `from * import` part
|
# incomplete `from * import` part
|
||||||
datetime = check_follow_definition_types("from datetime import datetim")
|
datetime = check_follow_definition_types("from datetime import datetim")
|
||||||
assert set(datetime) == set(['class']) # py33: builtin and pure py version
|
assert set(datetime) == set(['class', 'instance']) # py33: builtin and pure py version
|
||||||
|
|
||||||
# os.path check
|
# os.path check
|
||||||
ospath = check_follow_definition_types("from os.path import abspat")
|
ospath = check_follow_definition_types("from os.path import abspat")
|
||||||
@@ -54,7 +54,7 @@ def test_follow_definition_nested_import():
|
|||||||
assert types == ['module']
|
assert types == ['module']
|
||||||
|
|
||||||
types = check_follow_definition_types("import pkg.mod1; pkg.mod1.a")
|
types = check_follow_definition_types("import pkg.mod1; pkg.mod1.a")
|
||||||
assert types == ['class']
|
assert types == ['instance']
|
||||||
|
|
||||||
|
|
||||||
def test_follow_definition_land_on_import():
|
def test_follow_definition_land_on_import():
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from jedi._compatibility import builtins, is_py3
|
from jedi._compatibility import builtins, is_py3
|
||||||
from jedi.parser.representation import Function
|
from jedi.parser.representation import Function
|
||||||
from jedi.evaluate import compiled
|
from jedi.evaluate import compiled, representation
|
||||||
from jedi.evaluate import Evaluator
|
from jedi.evaluate import Evaluator
|
||||||
from jedi import Script
|
from jedi import Script
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ def test_simple():
|
|||||||
assert len(upper) == 1
|
assert len(upper) == 1
|
||||||
objs = list(e.execute(upper[0]))
|
objs = list(e.execute(upper[0]))
|
||||||
assert len(objs) == 1
|
assert len(objs) == 1
|
||||||
assert objs[0].obj is str
|
assert isinstance(objs[0], representation.Instance)
|
||||||
|
|
||||||
|
|
||||||
def test_fake_loading():
|
def test_fake_loading():
|
||||||
|
|||||||
Reference in New Issue
Block a user