Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions. See :ref:`warnings` for information on warning categories.
()
| 35 | |
| 36 | @fixture |
| 37 | def recwarn() -> Generator[WarningsRecorder]: |
| 38 | """Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions. |
| 39 | |
| 40 | See :ref:`warnings` for information on warning categories. |
| 41 | """ |
| 42 | wrec = WarningsRecorder(_ispytest=True) |
| 43 | with wrec: |
| 44 | warnings.simplefilter("default") |
| 45 | yield wrec |
| 46 | |
| 47 | |
| 48 | @overload |
nothing calls this directly
no test coverage detected