Skip to content

Commit

Permalink
Rewrite capture how-to for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
ayjayt committed Oct 5, 2024
1 parent eaa4004 commit 11578a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion changelog/12081.feature.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Added :fixture:`capteesys` to capture AND feed output to capture handler set by ``--capture=``.
Added :fixture:`capteesys` to capture AND pass output to next handler set by ``--capture=``.
9 changes: 5 additions & 4 deletions doc/en/how-to/capture-stdout-stderr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
How to capture stdout/stderr output
=========================================================

Pytest can intercept stdout and stderr by using the ``--capture=`` command-line
or argument or by using fixtures. The flag ``--capture=`` configures reporting,
whereas the fixtures offer somewhat more granular control and allow inspection
during testing. The reports can customized with the `-r flag <../reference/reference.html#command-line-flags>`_.
Pytest intercepts stdout and stderr as configured by the ``--capture=``
command-line argument or by using fixtures. The ``--capture=`` flag configures
reporting, whereas the fixtures offer more granular control and allows
inspection of output during testing. The reports can be customized with the
`-r flag <../reference/reference.html#command-line-flags>`_.

Default stdout/stderr/stdin capturing behaviour
---------------------------------------------------------
Expand Down

0 comments on commit 11578a9

Please sign in to comment.