doc: Add ellipsis to warning usecase list (#9558)

I feel like this makes it clearer where the code which was inside 'pytest.warns' is supposed to go.
This commit is contained in:
Florian Bruhin 2022-01-27 13:32:37 +01:00 committed by GitHub
parent f064942f2e
commit 843f03e3ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -363,7 +363,7 @@ 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:
@ -371,6 +371,7 @@ Here are some use cases involving warnings that often come up in tests, and sugg
with warnings.catch_warnings():
warnings.simplefilter("error")
...
- To suppress warnings, use:
@ -378,6 +379,7 @@ Here are some use cases involving warnings that often come up in tests, and sugg
with warnings.catch_warnings():
warnings.simplefilter("ignore")
...
.. _custom_failure_messages: