Check that recwarn can capture DeprecationWarning by default without custom filterwarnings (see #8666).
(recwarn: WarningsRecorder)
| 32 | |
| 33 | @pytest.mark.filterwarnings("") |
| 34 | def test_recwarn_captures_deprecation_warning(recwarn: WarningsRecorder) -> None: |
| 35 | """ |
| 36 | Check that recwarn can capture DeprecationWarning by default |
| 37 | without custom filterwarnings (see #8666). |
| 38 | """ |
| 39 | warnings.warn(DeprecationWarning("some deprecation")) |
| 40 | assert len(recwarn) == 1 |
| 41 | assert recwarn.pop(DeprecationWarning) |
| 42 | |
| 43 | |
| 44 | class TestSubclassWarningPop: |