Update doc/en/how-to/capture-warnings.rst
This commit is contained in:
parent
d73b49d75d
commit
6c7603c9c6
|
@ -276,6 +276,9 @@ first be escaped with ``re.escape``.
|
|||
|
||||
Some examples:
|
||||
|
||||
.. code-block: python
|
||||
|
||||
|
||||
>>> with warns(UserWarning, match='must be 0 or None'):
|
||||
... warnings.warn("value must be 0 or None", UserWarning)
|
||||
|
||||
|
|
Loading…
Reference in New Issue