1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2024-12-23 16:46:14 +01:00

Fix tests: Python 3.12+ toxenvs don't have setuptools in them

This commit is contained in:
Miro Hrončok 2024-10-22 15:35:12 +02:00
parent 18c050c748
commit 0db9b4b3d4
2 changed files with 8 additions and 8 deletions

View File

@ -113,11 +113,11 @@ def test_print_deps_with_tox_minversion(projdir, toxenv, print_deps_stdout_arg):
@pytest.mark.parametrize("toxenv", envs_from_tox_ini()) @pytest.mark.parametrize("toxenv", envs_from_tox_ini())
def test_print_deps_with_tox_requires(projdir, toxenv, print_deps_stdout_arg): def test_print_deps_with_tox_requires(projdir, toxenv, print_deps_stdout_arg):
with modify_config(projdir / "tox.ini") as config: with modify_config(projdir / "tox.ini") as config:
config["tox"]["requires"] = "\n setuptools > 30\n pluggy" config["tox"]["requires"] = "\n pytest > 5\n pluggy"
result = tox("-e", toxenv, print_deps_stdout_arg) result = tox("-e", toxenv, print_deps_stdout_arg)
expected = textwrap.dedent( expected = textwrap.dedent(
f""" f"""
setuptools > 30 pytest > 5
pluggy pluggy
six six
py py
@ -133,12 +133,12 @@ def test_print_deps_with_tox_minversion_and_requires(
): ):
with modify_config(projdir / "tox.ini") as config: with modify_config(projdir / "tox.ini") as config:
config["tox"]["minversion"] = "3.13" config["tox"]["minversion"] = "3.13"
config["tox"]["requires"] = "\n setuptools > 30\n pluggy" config["tox"]["requires"] = "\n pytest > 5\n pluggy"
result = tox("-e", toxenv, print_deps_stdout_arg) result = tox("-e", toxenv, print_deps_stdout_arg)
expected = textwrap.dedent( expected = textwrap.dedent(
f""" f"""
tox >= 3.13 tox >= 3.13
setuptools > 30 pytest > 5
pluggy pluggy
six six
py py

View File

@ -87,11 +87,11 @@ def test_print_deps_with_tox_minversion(projdir, toxenv, print_deps_stdout_arg):
@pytest.mark.parametrize("toxenv", envs_from_tox_ini()) @pytest.mark.parametrize("toxenv", envs_from_tox_ini())
def test_print_deps_with_tox_requires(projdir, toxenv, print_deps_stdout_arg): def test_print_deps_with_tox_requires(projdir, toxenv, print_deps_stdout_arg):
with modify_config(projdir / "tox.ini") as config: with modify_config(projdir / "tox.ini") as config:
config["tox"]["requires"] = "\n setuptools > 30\n pluggy" config["tox"]["requires"] = "\n pytest > 5\n pluggy"
result = tox("-e", toxenv, print_deps_stdout_arg) result = tox("-e", toxenv, print_deps_stdout_arg)
expected = textwrap.dedent( expected = textwrap.dedent(
f""" f"""
setuptools>30 pytest>5
pluggy pluggy
tox tox
six six
@ -108,11 +108,11 @@ def test_print_deps_with_tox_minversion_and_requires(
): ):
with modify_config(projdir / "tox.ini") as config: with modify_config(projdir / "tox.ini") as config:
config["tox"]["minversion"] = "3.13" config["tox"]["minversion"] = "3.13"
config["tox"]["requires"] = "\n setuptools > 30\n pluggy" config["tox"]["requires"] = "\n pytest > 5\n pluggy"
result = tox("-e", toxenv, print_deps_stdout_arg) result = tox("-e", toxenv, print_deps_stdout_arg)
expected = textwrap.dedent( expected = textwrap.dedent(
f""" f"""
setuptools>30 pytest>5
pluggy pluggy
tox>=3.13 tox>=3.13
six six