Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.0.x] doc: Add ellipsis to warning usecase list #9562

Merged
merged 1 commit into from Jan 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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