diff --git a/test/test_api/test_classes.py b/test/test_api/test_classes.py index cb99548b8..080a6d575 100644 --- a/test/test_api/test_classes.py +++ b/test/test_api/test_classes.py @@ -188,10 +188,7 @@ def test_functions_should_have_params(Script): assert c.get_signatures() -def test_hashlib_params(Script, environment): - if environment.version_info < (3,): - pytest.skip() - +def test_hashlib_params(Script): script = Script('from hashlib import sha256') c, = script.complete() sig, = c.get_signatures() diff --git a/test/test_inference/test_fstring.py b/test/test_inference/test_fstring.py index ed3030901..6c143ff7f 100644 --- a/test/test_inference/test_fstring.py +++ b/test/test_inference/test_fstring.py @@ -1,13 +1,6 @@ -import pytest from textwrap import dedent -@pytest.fixture(autouse=True) -def skip_not_supported(environment): - if environment.version_info < (3, 6): - pytest.skip() - - def test_fstring_multiline(Script): code = dedent("""\ '' f'''s{ diff --git a/test/test_inference/test_literals.py b/test/test_inference/test_literals.py index f63b616f9..c70f7b564 100644 --- a/test/test_inference/test_literals.py +++ b/test/test_inference/test_literals.py @@ -12,29 +12,23 @@ def _infer_literal(Script, code, is_fstring=False): return def_._name._value.get_safe_value() -def test_f_strings(Script, environment): +def test_f_strings(Script): """ f literals are not really supported in Jedi. They just get ignored and an empty string is returned. """ - if environment.version_info < (3, 6): - pytest.skip() - assert _infer_literal(Script, 'f"asdf"', is_fstring=True) == '' assert _infer_literal(Script, 'f"{asdf} "', is_fstring=True) == '' assert _infer_literal(Script, 'F"{asdf} "', is_fstring=True) == '' assert _infer_literal(Script, 'rF"{asdf} "', is_fstring=True) == '' -def test_rb_strings(Script, environment): +def test_rb_strings(Script): assert _infer_literal(Script, 'x = br"asdf"; x') == b'asdf' assert _infer_literal(Script, 'x = rb"asdf"; x') == b'asdf' -def test_thousand_separators(Script, environment): - if environment.version_info < (3, 6): - pytest.skip() - +def test_thousand_separators(Script): assert _infer_literal(Script, '1_2_3') == 123 assert _infer_literal(Script, '123_456_789') == 123456789 assert _infer_literal(Script, '0x3_4') == 52 diff --git a/test/test_inference/test_signature.py b/test/test_inference/test_signature.py index 4ade46e45..b72ae0ae8 100644 --- a/test/test_inference/test_signature.py +++ b/test/test_inference/test_signature.py @@ -1,5 +1,5 @@ from textwrap import dedent -from operator import ge, lt +from operator import ge import re import os @@ -17,14 +17,10 @@ ('str', "str(object='', /) -> str", ['object'], ge, (3, 6)), - ('pow', 'pow(x, y, z=None, /) -> number', ['x', 'y', 'z'], lt, (3, 6)), ('pow', 'pow(base, exp, mod=None)', ['base', 'exp', 'mod'], ge, (3, 8)), - ('bytes.partition', 'partition(self, sep, /) -> (head, sep, tail)', - ['self', 'sep'], lt, (3, 6)), ('bytes.partition', 'partition(self, sep, /)', ['self', 'sep'], ge, (3, 6)), - ('bytes().partition', 'partition(sep, /) -> (head, sep, tail)', ['sep'], lt, (3, 6)), ('bytes().partition', 'partition(sep, /)', ['sep'], ge, (3, 6)), ] )