Skip to content

Commit

Permalink
[7.0.x] doc: Add ellipsis to warning usecase list (#9562)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Bruhin <me@the-compiler.org>
  • Loading branch information
github-actions[bot] and The-Compiler committed Jan 27, 2022
1 parent 0a7be97 commit f17525d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/en/how-to/capture-warnings.rst
Expand Up @@ -363,21 +363,23 @@ Here are some use cases involving warnings that often come up in tests, and sugg
.. code-block:: python
with pytest.warns():
pass
...
- To ensure that **no** warnings are emitted, use:

.. code-block:: python
with warnings.catch_warnings():
warnings.simplefilter("error")
...
- To suppress warnings, use:

.. code-block:: python
with warnings.catch_warnings():
warnings.simplefilter("ignore")
...
.. _custom_failure_messages:
Expand Down

0 comments on commit f17525d

Please sign in to comment.