Remove a lot of test references to Python 2/3.5

This commit is contained in:
Dave Halter
2020-07-02 00:17:21 +02:00
parent 0e5869b52f
commit 50b85153ce
32 changed files with 24 additions and 87 deletions

View File

@@ -595,7 +595,7 @@ def test_definition_goto_follow_imports(Script):
'foo(x: str, y: int=None) -> Union[int, str]'),
]
)
def test_get_type_hint(Script, code, expected, skip_pre_python36):
def test_get_type_hint(Script, code, expected):
code = 'from typing import *\n' + code
d, = Script(code).goto()
assert d.get_type_hint() == expected

View File

@@ -382,7 +382,7 @@ _dict_keys_completion_tests = [
@pytest.mark.parametrize(
'added_code, column, expected', _dict_keys_completion_tests
)
def test_dict_keys_completions(Script, added_code, column, expected, skip_pre_python36):
def test_dict_keys_completions(Script, added_code, column, expected):
code = dedent(r'''
ints = {1: ''}
ints[50] = 3.0
@@ -405,7 +405,7 @@ def test_dict_keys_completions(Script, added_code, column, expected, skip_pre_py
@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL")
def test_dict_keys_in_weird_case(Script, skip_pre_python36):
def test_dict_keys_in_weird_case(Script):
assert Script('a[\n# foo\nx]').complete(line=2, column=0)

View File

@@ -27,7 +27,7 @@ def test_find_system_environments():
@pytest.mark.parametrize(
'version',
['2.7', '3.5', '3.6', '3.7']
['3.6', '3.7', '3.8', '3.9']
)
def test_versions(version):
try:

View File

@@ -134,7 +134,7 @@ def test_load_save_project(tmpdir):
]
)
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Ignore Python 2, because EOL")
def test_search(string, full_names, kwargs, skip_pre_python36):
def test_search(string, full_names, kwargs):
some_search_test_var = 1.0
project = Project(test_dir)
if kwargs.pop('complete', False) is True:
@@ -153,7 +153,7 @@ def test_search(string, full_names, kwargs, skip_pre_python36):
]
)
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Ignore Python 2, because EOL")
def test_complete_search(Script, string, completions, all_scopes, skip_pre_python36):
def test_complete_search(Script, string, completions, all_scopes):
project = Project(test_dir)
defs = project.complete_search(string, all_scopes=all_scopes)
assert [d.complete for d in defs] == completions

View File

@@ -1,5 +1,4 @@
import os
import sys
from textwrap import dedent
import pytest
@@ -7,12 +6,6 @@ import pytest
import jedi
@pytest.fixture(autouse=True)
def skip_old_python(skip_pre_python36):
if sys.version_info < (3, 6):
pytest.skip()
@pytest.fixture()
def dir_with_content(tmpdir):
with open(os.path.join(tmpdir.strpath, 'modx.py'), 'w', newline='') as f:

View File

@@ -65,7 +65,7 @@ class SomeClass:
('SomeCl.twice', [], dict(all_scopes=True, complete=True, fuzzy=True)),
]
)
def test_simple_search(Script, string, descriptions, kwargs, skip_pre_python36):
def test_simple_search(Script, string, descriptions, kwargs):
if sys.version_info < (3, 6):
pytest.skip()

View File

@@ -51,7 +51,6 @@ def test_param_default(Script, code, expected_params):
assert annotation.description == expected
@pytest.mark.skipif(sys.version_info < (3, 5), reason="Python <3.5 doesn't support __signature__")
@pytest.mark.parametrize(
'code, index, param_code, kind', [
('def f(x=1): pass\nf', 0, 'x=1', 'POSITIONAL_OR_KEYWORD'),