Closed
Description
We should add some stdlib links to the relevant docs:
- If you want to get a list of warnings, but no error if no warnings were emitted, use
warnings.catch_warnings()
- To say "any warning here is unexpected / an error", use
with catch_warnings(): simplefilter("error"); ...
I didn't intend to break anything, but nor did I consider that people might be using pytest.warns()
like warnings.catch_warnings()
. My apologies for the inconvenience!
Originally posted by @Zac-HD in #8677 (comment)