From a803d687e2ac4f53b337becc0bcf6debd1b6f954 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 24 Jul 2019 13:44:26 +0200 Subject: [PATCH] Skipped Python 2 Interpreter tests the wrong way --- test/test_api/test_interpreter.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test_api/test_interpreter.py b/test/test_api/test_interpreter.py index d4d17d79..3bbe886c 100644 --- a/test/test_api/test_interpreter.py +++ b/test/test_api/test_interpreter.py @@ -229,7 +229,8 @@ def test_property_error_newstyle(): assert lst == [] -def test_param_completion(skip_python2): +@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") +def test_param_completion(): def foo(bar): pass @@ -275,7 +276,8 @@ def test_completion_param_annotations(): assert d.name == 'bytes' -def test_keyword_argument(skip_python2): +@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") +def test_keyword_argument(): def f(some_keyword_argument): pass @@ -447,6 +449,7 @@ def test_core_module_completes(module_name): assert jedi.Interpreter(module_name + '.\n', [locals()]).completions() +@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") @pytest.mark.parametrize( 'code, expected, index', [ ('a(', ['a', 'b', 'c'], 0), @@ -456,7 +459,7 @@ def test_core_module_completes(module_name): ('c(', ['b', 'c'], 0), ] ) -def test_partial_signatures(code, expected, index, skip_python2): +def test_partial_signatures(code, expected, index): import functools def func(a, b, c):