Skip to content
Myr

📝 Clarify the need for `mix_stderr` when accessing the output of `stderr` in tests (#1045)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Chris Adams · committed by GitHub · parent ece5536 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/tutorial/testing.md+1 added-1 removed
69 unmodified lines
70Then we check that the text printed to "standard output" contains the text that our CLI program prints.7172/// tip7374You could also check `result.stderr` for "standard error" independently from "standard output" if your `CliRunner` instance is created with the `mix_stderr=False` argument.74You could also check output sent to "standard error" (`stderr`) instead of "standard output" (`stdout`). To do so, make sure your `CliRunner` instance is created with the `mix_stderr=False` argument. You need this setting to be able to access `result.stderr` in tests.7576///7778/// info
136 unmodified lines