Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions. See https://docs.python.org/library/how-to/capture-warnings.html for information on warning categories.
()
| 27 | |
| 28 | @fixture |
| 29 | def recwarn() -> Generator["WarningsRecorder", None, None]: |
| 30 | """Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions. |
| 31 | |
| 32 | See https://docs.python.org/library/how-to/capture-warnings.html for information |
| 33 | on warning categories. |
| 34 | """ |
| 35 | wrec = WarningsRecorder(_ispytest=True) |
| 36 | with wrec: |
| 37 | warnings.simplefilter("default") |
| 38 | yield wrec |
| 39 | |
| 40 | |
| 41 | @overload |
nothing calls this directly
no test coverage detected