Skip to content

Commit c837293

Browse files
committed
add re-emit note
1 parent 7f2abae commit c837293

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/_pytest/recwarn.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ def warns( # noqa: F811
150150
This could be achieved in the same way as with exceptions, see
151151
:ref:`parametrizing_conditional_raising` for an example.
152152
153+
.. note::
154+
By default, the function will re-emit all warnings that are not of the expected class.
155+
By using the ``match`` keyword argument, all other un-matched warnings will be re-emitted.
156+
157+
153158
"""
154159
__tracebackhide__ = True
155160
if not args:

0 commit comments

Comments
 (0)