It's always python 3

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2022-08-11 16:26:40 +01:00 committed by Pedro Algarvio
parent fe7283a5ff
commit 60e28fe66d
2 changed files with 5 additions and 10 deletions

View file

@ -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")

View file

@ -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__)