Skip to content

Commit 8793a5d

Browse files
committed
tests/cli(fix): Include stderr in output capture for CLI tests
why: Some CLI output goes to stderr and was being missed what: - Capture both stdout and stderr in test_sync_cli_filter_non_existent - Ensures complete output validation in test
1 parent f89f5a4 commit 8793a5d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)