Skip to content

Latest commit

 

History

History
3 lines (3 loc) · 508 Bytes

10865.improvement.rst

File metadata and controls

3 lines (3 loc) · 508 Bytes

pytest.warns now validates that warnings.warn was called with a str or a Warning. Currently in Python it is possible to use other types, however this causes an exception when warnings.filterwarnings is used to filter those warnings (see CPython #103577 for a discussion). While this can be considered a bug in CPython, we decided to put guards in pytest as the error message produced without this check in place is confusing.