Skip to content

Commit 843dee6

Browse files
committed
Fix tests for tox 4.0.15
1 parent 1130fb7 commit 843dee6

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

tests/test_integration_tox4.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
NATIVE_SITE_PACKAGES,
1212
NATIVE_TOXENV,
1313
TOX_VERSION,
14-
TOX_MIN_VERSION,
1514
envs_from_tox_ini,
1615
modify_config,
1716
needs_all_pythons,
@@ -36,7 +35,7 @@ def test_print_deps(toxenv, print_deps_stdout_arg):
3635
result = tox("-e", toxenv, print_deps_stdout_arg)
3736
expected = textwrap.dedent(
3837
f"""
39-
tox>={TOX_MIN_VERSION}
38+
tox
4039
six
4140
py
4241
{tox_footer(toxenv)}
@@ -57,7 +56,7 @@ def test_print_deps_with_commands_pre_post(projdir, toxenv, pre_post, print_deps
5756
result = tox("-e", toxenv, print_deps_stdout_arg)
5857
expected = textwrap.dedent(
5958
f"""
60-
tox>={TOX_MIN_VERSION}
59+
tox
6160
six
6261
py
6362
{tox_footer(toxenv)}
@@ -94,7 +93,7 @@ def test_print_deps_with_tox_requires(projdir, toxenv, print_deps_stdout_arg):
9493
f"""
9594
setuptools>30
9695
pluggy
97-
tox>={TOX_MIN_VERSION}
96+
tox
9897
six
9998
py
10099
{tox_footer(toxenv)}
@@ -166,7 +165,7 @@ def test_allenvs_print_deps(print_deps_stdout_arg):
166165
result = tox(print_deps_stdout_arg)
167166
expected = []
168167
for env in envs_from_tox_ini():
169-
expected.extend((f"tox>={TOX_MIN_VERSION}", "six", "py", f"{env}: OK"))
168+
expected.extend(("tox", "six", "py", f"{env}: OK"))
170169
expected.pop() # The last "py310: OK" is not there
171170
expected.append(tox_footer(spaces=0))
172171
expected = ("\n".join(expected)).splitlines()
@@ -189,7 +188,7 @@ def test_print_deps_to_file(toxenv, tmp_path):
189188
depspath = tmp_path / "deps"
190189
result = tox("-e", toxenv, "--print-deps-to", str(depspath))
191190
assert sorted(depspath.read_text().splitlines()) == sorted(
192-
[f"tox>={TOX_MIN_VERSION}", "six", "py"]
191+
["tox", "six", "py"]
193192
)
194193
expected = tox_footer(toxenv, spaces=0) + "\n"
195194
assert prep_tox_output(result.stdout) == expected
@@ -209,7 +208,7 @@ def test_allenvs_print_deps_to_file(tmp_path, option):
209208
depspath = tmp_path / "deps"
210209
result = tox(option, str(depspath))
211210
assert sorted(depspath.read_text().splitlines()) == sorted(
212-
[f"tox>={TOX_MIN_VERSION}", "six", "py"] * len(envs_from_tox_ini())
211+
["tox", "six", "py"] * len(envs_from_tox_ini())
213212
)
214213
expected = ""
215214
for env in envs_from_tox_ini()[:-1]:
@@ -352,7 +351,7 @@ def test_print_deps_without_python_command(tmp_path, print_deps_stdout_arg):
352351
result = tox("-e", NATIVE_TOXENV, print_deps_stdout_arg, env=env)
353352
expected = textwrap.dedent(
354353
f"""
355-
tox>={TOX_MIN_VERSION}
354+
tox
356355
six
357356
py
358357
{tox_footer(NATIVE_TOXENV)}

tests/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def tox(*args, quiet=True, **kwargs):
5353

5454

5555
TOX_VERSION = ver(tox("--version").stdout.split(" ")[0].split("+")[0])
56-
TOX_MIN_VERSION = ver(f"{TOX_VERSION.major}.{TOX_VERSION.minor}")
5756
TOX4 = TOX_VERSION.major == 4
5857

5958

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extras =
1010
deps=
1111
tox324: tox >=3.24,<3.25
1212
tox3: tox < 4
13-
tox4: tox >=4,< 5
13+
tox4: tox >=4.0.15,< 5
1414
commands =
1515
pytest -v {posargs} tests
1616

0 commit comments

Comments
 (0)