From 60e28fe66da47f7eff1ab647209460778eac648b Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 11 Aug 2022 16:26:40 +0100 Subject: [PATCH] It's always python 3 Signed-off-by: Pedro Algarvio --- tests/conftest.py | 12 +++++------- tests/integration/test_installation.py | 3 --- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index e718201..5e9429d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,7 +9,10 @@ log = logging.getLogger(__name__) @pytest.fixture(scope="session") def host(): - if os.environ.get("RUNNER_OS", "") == "macOS" and os.environ.get("KITCHEN_LOCAL_YAML", "") == "kitchen.macos.yml": + if ( + os.environ.get("RUNNER_OS", "") == "macOS" + and os.environ.get("KITCHEN_LOCAL_YAML", "") == "kitchen.macos.yml" + ): # Adjust the `PATH` so that the `salt-call` executable can be found os.environ["PATH"] = "/opt/salt/bin{}{}".format(os.pathsep, os.environ["PATH"]) return testinfra.get_host("local://", sudo=True) @@ -37,12 +40,7 @@ def host(): @pytest.fixture(scope="session") def target_python_version(): - target_python = os.environ["KITCHEN_SUITE"].split("-", 1)[0] - if target_python == "latest": - pytest.skip( - "Unable to get target python from {}".format(os.environ["KITCHEN_SUITE"]) - ) - return int(target_python.replace("py", "")) + return 3 @pytest.fixture(scope="session") diff --git a/tests/integration/test_installation.py b/tests/integration/test_installation.py index 30bc087..aacc7de 100644 --- a/tests/integration/test_installation.py +++ b/tests/integration/test_installation.py @@ -1,9 +1,6 @@ # -*- coding: utf-8 -*- -import json import os -import pytest import logging -import pprint from contextlib import nullcontext log = logging.getLogger(__name__)