From e5fabb4c5f4b71d828b357ed93f104487e0346b8 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 1 Mar 2020 01:42:22 +0100 Subject: [PATCH] Fix some version issue stuff --- test/test_api/test_environment.py | 3 ++- test/test_inference/test_pyc.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_api/test_environment.py b/test/test_api/test_environment.py index 0baf3fb8..ef3815a8 100644 --- a/test/test_api/test_environment.py +++ b/test/test_api/test_environment.py @@ -118,7 +118,8 @@ def test_create_environment_executable(): assert environment.executable == sys.executable -def test_get_default_environment_from_env_does_not_use_safe(tmpdir, monkeypatch, skip_python2): +@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") +def test_get_default_environment_from_env_does_not_use_safe(tmpdir, monkeypatch): fake_python = os.path.join(str(tmpdir), 'fake_python') with open(fake_python, 'w', newline='') as f: f.write('') diff --git a/test/test_inference/test_pyc.py b/test/test_inference/test_pyc.py index bc8de391..fec4c958 100644 --- a/test/test_inference/test_pyc.py +++ b/test/test_inference/test_pyc.py @@ -25,7 +25,7 @@ class Bar: @pytest.fixture -def pyc_project_path(tmpdir, skip_python2): +def pyc_project_path(tmpdir): path = tmpdir.strpath dummy_package_path = os.path.join(path, "dummy_package") os.mkdir(dummy_package_path) @@ -56,6 +56,7 @@ def pyc_project_path(tmpdir, skip_python2): @pytest.mark.parametrize('load_unsafe_extensions', [False, True]) +@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") def test_pyc(pyc_project_path, environment, load_unsafe_extensions): """ The list of completion must be greater than 2.