Skip to content

Commit f8d6560

Browse files
test: fix test_bad_config failure due to Click 8.2.0 breaking change
Fix test failure in test_bad_config caused by Click 8.2.0+ behavior change. Click 8.2.0+ now keeps stdout and stderr streams separate by default. Maintains backward compatibility with existing test assertions. Fixes #1308
1 parent 655b218 commit f8d6560

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ def test_bad_config() -> None:
1919
result = runner.invoke(app, ["generate", f"--config={config_path}", f"--path={path}"])
2020

2121
assert result.exit_code == 2
22-
assert "Unable to parse config" in result.stdout
22+
error_message = "Unable to parse config"
23+
assert (
24+
error_message in result.stderr
25+
or error_message in result.stdout
26+
), f"Error message '{error_message}' not found in any output. stdout: {repr(result.stdout)}, stderr: {repr(result.stderr)}, output: {repr(result.output)}"
2327

2428

2529
class TestGenerate:

0 commit comments

Comments
 (0)