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:
parent
f064942f2e
commit
843f03e3ca
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue