From ce748e6dc702160887e922ae2cf683695e52fdee Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 1 Jan 2020 13:13:10 +0100 Subject: [PATCH] Skip dict key completion tests for Python 3.5, because it's just annoying with all the f-string stuff --- conftest.py | 8 ++++++++ test/test_api/test_completion.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 92595b66..47d98b90 100644 --- a/conftest.py +++ b/conftest.py @@ -166,3 +166,11 @@ def skip_pre_python35(environment): # This if is just needed to avoid that tests ever skip way more than # they should for all Python versions. pytest.skip() + + +@pytest.fixture() +def skip_pre_python36(environment): + if environment.version_info < (3, 6): + # This if is just needed to avoid that tests ever skip way more than + # they should for all Python versions. + pytest.skip() diff --git a/test/test_api/test_completion.py b/test/test_api/test_completion.py index dc91c9c4..c653e0a2 100644 --- a/test/test_api/test_completion.py +++ b/test/test_api/test_completion.py @@ -330,7 +330,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_python35): +def test_dict_keys_completions(Script, added_code, column, expected, skip_pre_python36): code = dedent(r''' ints = {1: ''} ints[50] = 3.0