Skip to content

Commit 3854a7d

Browse files
committed
Fix test_notoxini_help_still_works with tox v3.14.6
Since tox version 3.14.6 test_notoxini_help_still_works from test_z_cmdline.py fails due to tox-dev/tox#1539 Sync the tests from that tox version to fix the issue.
1 parent 3bdcc27 commit 3854a7d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/test_z_cmdline.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,32 @@ def test_getvenv(self, initproj):
8686
def test_notoxini_help_still_works(initproj, cmd):
8787
initproj("example123-0.5", filedefs={"tests": {"test_hello.py": "def test_hello(): pass"}})
8888
result = cmd("-h")
89-
msg = "ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found\n"
90-
assert result.err == msg
9189
assert result.out.startswith("usage: ")
9290
assert any("--help" in l for l in result.outlines), result.outlines
9391
result.assert_success(is_run_test_env=False)
9492

9593

94+
def test_notoxini_noerror_in_help(initproj, cmd):
95+
initproj("examplepro", filedefs={})
96+
result = cmd("-h")
97+
msg = "ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found\n"
98+
assert result.err != msg
99+
100+
96101
def test_notoxini_help_ini_still_works(initproj, cmd):
97102
initproj("example123-0.5", filedefs={"tests": {"test_hello.py": "def test_hello(): pass"}})
98103
result = cmd("--help-ini")
99104
assert any("setenv" in l for l in result.outlines), result.outlines
100105
result.assert_success(is_run_test_env=False)
101106

102107

108+
def test_notoxini_noerror_in_help_ini(initproj, cmd):
109+
initproj("examplepro", filedefs={})
110+
result = cmd("--help-ini")
111+
msg = "ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found\n"
112+
assert result.err != msg
113+
114+
103115
def test_envdir_equals_toxini_errors_out(cmd, initproj):
104116
initproj(
105117
"interp123-0.7",

0 commit comments

Comments
 (0)