1
0
forked from VimPlug/jedi

Change some tests in Python2

This commit is contained in:
Dave Halter
2018-12-08 23:55:08 +01:00
parent decb5046ea
commit 0c37256050
2 changed files with 11 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ def check_follow_definition_types(Script, source):
return [d.type for d in defs]
def test_follow_import_incomplete(Script):
def test_follow_import_incomplete(Script, environment):
"""
Completion on incomplete imports should always take the full completion
to do any evaluation.
@@ -34,8 +34,10 @@ def test_follow_import_incomplete(Script):
# incomplete `from * import` part
datetime = check_follow_definition_types(Script, "from datetime import datetim")
assert set(datetime) == {'class', 'instance'} # py33: builtin and pure py version
if environment.version_info.major == 2:
assert datetime == ['class']
else:
assert set(datetime) == {'class', 'instance'} # py3: builtin and pure py version
# os.path check
ospath = check_follow_definition_types(Script, "from os.path import abspat")
assert ospath == ['function']