Skip to content

Commit

Permalink
Tests: Don't assume Python 3.10 is always installed, use current Pyth…
Browse files Browse the repository at this point in the history
…on version

See tox-dev#3089 (review)
  • Loading branch information
hroncok committed Aug 30, 2023
1 parent 4700298 commit fe1bef1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/session/test_env_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fe1bef1

Please sign in to comment.