diff options
author | Victor Stinner <vstinner@python.org> | 2021-10-11 21:07:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 21:07:21 (GMT) |
commit | 1ebd798fddef51e1f6fd40a4860278a1851ac268 (patch) | |
tree | ac15076d8bd096d265072c9888361640400a8eee /Doc/library/test.rst | |
parent | 47717d1186563695e798b40350d15b00d04a5237 (diff) | |
download | cpython-1ebd798fddef51e1f6fd40a4860278a1851ac268.zip cpython-1ebd798fddef51e1f6fd40a4860278a1851ac268.tar.gz cpython-1ebd798fddef51e1f6fd40a4860278a1851ac268.tar.bz2 |
bpo-45410: Add test.support.flush_std_streams() (GH-28885)
support.print_warning() now flushs sys.stdout.
Diffstat (limited to 'Doc/library/test.rst')
-rw-r--r-- | Doc/library/test.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/test.rst b/Doc/library/test.rst index a8dc354..699db14 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -607,6 +607,15 @@ The :mod:`test.support` module defines the following functions: target of the "as" clause, if there is one. +.. function:: flush_std_streams() + + Call the ``flush()`` method on :data:`sys.stdout` and then on + :data:`sys.stderr`. It can be used to make sure that the logs order is + consistent before writing into stderr. + + .. versionadded:: 3.11 + + .. function:: print_warning(msg) Print a warning into :data:`sys.__stderr__`. Format the message as: |