Skip to content

Commit

Permalink
doc: Clarify capturing .readouterr() return value (#13222) (#13225)
Browse files Browse the repository at this point in the history
This got added in 38fb6aa, where the "The
return value ... changed" made a lot of sense. However,
9c5da9c removed the "versionadded" without
adjusting the wording.

Also see 3a4435f.

(cherry picked from commit 62aa427)

Co-authored-by: Florian Bruhin <[email protected]>
  • Loading branch information
patchback[bot] and The-Compiler authored Feb 15, 2025
1 parent 2ebba00 commit edbfff7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion doc/en/how-to/capture-stdout-stderr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ test from having to care about setting/resetting
output streams and also interacts well with pytest's
own per-test capturing.

The return value from ``readouterr`` changed to a ``namedtuple`` with two attributes, ``out`` and ``err``.
The return value of ``readouterr()`` is a ``namedtuple`` with two attributes, ``out`` and ``err``.

If the code under test writes non-textual data (``bytes``), you can capture this using
the :fixture:`capsysbinary` fixture which instead returns ``bytes`` from
Expand Down
4 changes: 0 additions & 4 deletions doc/en/how-to/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ pytest enables test parametrization at several levels:

.. regendoc: wipe
Several improvements.
The builtin :ref:`pytest.mark.parametrize ref` decorator enables
parametrization of arguments for a test function. Here is a typical example
of a test function that implements checking that a certain input leads
Expand Down

0 comments on commit edbfff7

Please sign in to comment.