Skip to content

Commit 75fd9ef

Browse files
committed
tests/cli(fix[output-capture]): Fix CLI test output capture to include stderr
why: SimpleLogFormatter outputs to stderr via StreamHandler, but test only captured stdout what: - Update output capture to include both stdout and stderr - Use iterable unpacking for cleaner code style - Ensure all CLI log messages are properly captured in tests
1 parent b64bf70 commit 75fd9ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def test_sync_cli_filter_non_existent(
103103
with contextlib.suppress(SystemExit):
104104
cli(["sync", *sync_args])
105105

106-
output = "".join(list(caplog.messages) + list(capsys.readouterr().out))
106+
captured = capsys.readouterr()
107+
output = "".join([*caplog.messages, captured.out, captured.err])
107108

108109
if expected_in_out is not None:
109110
if isinstance(expected_in_out, str):

0 commit comments

Comments
 (0)