Skip to content

Commit 1ce472b

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.
1 parent 655b218 commit 1ce472b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ 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 error_message in result.stderr or error_message in result.stdout, (
24+
f"Error message '{error_message}' not found in any output. stdout: {result.stdout!r}, stderr: {result.stderr!r}"
25+
)
2326

2427

2528
class TestGenerate:

0 commit comments

Comments
 (0)