diff --git a/tests/session/test_env_select.py b/tests/session/test_env_select.py index 564806600a..dfa03244b5 100644 --- a/tests/session/test_env_select.py +++ b/tests/session/test_env_select.py @@ -13,6 +13,9 @@ from tox.pytest import MonkeyPatch, ToxProjectCreator +CURRENT_PYENV = f"py{sys.version_info[0]}{sys.version_info[1]}" # e.g. py310 + + def test_label_core_can_define(tox_project: ToxProjectCreator) -> None: ini = """ [tox] @@ -151,7 +154,7 @@ def test_cli_env_can_be_specified_in_additional_environments(tox_project: ToxPro assert not outcome.err -@pytest.mark.parametrize("env_name", ["py", "py310", ".pkg"]) +@pytest.mark.parametrize("env_name", ["py", CURRENT_PYENV, ".pkg"]) def test_allowed_implicit_cli_envs(env_name: str, tox_project: ToxProjectCreator) -> None: proj = tox_project({"tox.ini": ""}) outcome = proj.run("r", "-e", env_name)