1
0
forked from VimPlug/jedi

Remove most version_info.major usages

This commit is contained in:
Dave Halter
2020-07-02 03:00:01 +02:00
parent 188fdcd34f
commit 6e184bca97
16 changed files with 26 additions and 95 deletions

View File

@@ -9,9 +9,6 @@ def test_simple_annotations(Script, environment):
If annotations adhere to PEP-0484, we use them (they override inference),
else they are parsed but ignored
"""
if environment.version_info.major == 2:
pytest.skip()
source = dedent("""\
def annot(a:3):
return a
@@ -45,18 +42,12 @@ def test_simple_annotations(Script, environment):
r'1\n'
])
def test_illegal_forward_references(Script, environment, reference):
if environment.version_info.major == 2:
pytest.skip()
source = 'def foo(bar: "%s"): bar' % reference
assert not Script(source).infer()
def test_lambda_forward_references(Script, environment):
if environment.version_info.major == 2:
pytest.skip()
source = 'def foo(bar: "lambda: 3"): bar'
# For now just receiving the 3 is ok. I'm doubting that this is what we