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