📝 Clarify testing documentation about checking stderr (#335)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Christophe Gabard 2022-07-02 19:36:25 +02:00 committed by GitHub
parent 4d26e777ce
commit f4a5ee1bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,7 @@ Here we are checking that the exit code is 0, as it is for programs that exit wi
Then we check that the text printed to "standard output" contains the text that our CLI program prints.
!!! tip
You could also check `result.stderr` for "standard error".
You could also check `result.stderr` for "standard error" independently from "standard output" if your `CliRunner` instance is created with the `mix_stderr=False` argument.
!!! info
If you need a refresher about what is "standard output" and "standard error" check the section in [Printing and Colors: "Standard Output" and "Standard Error"](printing.md#standard-output-and-standard-error){.internal-link target=_blank}.