Skip to content

Commit 843f03e

Browse files
authored
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.
1 parent f064942 commit 843f03e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/en/how-to/capture-warnings.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,21 +363,23 @@ Here are some use cases involving warnings that often come up in tests, and sugg
363363
.. code-block:: python
364364
365365
with pytest.warns():
366-
pass
366+
...
367367
368368
- To ensure that **no** warnings are emitted, use:
369369

370370
.. code-block:: python
371371
372372
with warnings.catch_warnings():
373373
warnings.simplefilter("error")
374+
...
374375
375376
- To suppress warnings, use:
376377

377378
.. code-block:: python
378379
379380
with warnings.catch_warnings():
380381
warnings.simplefilter("ignore")
382+
...
381383
382384
383385
.. _custom_failure_messages:

0 commit comments

Comments
 (0)