MCPcopy
hub / github.com/pytest-dev/pytest / clear

Method clear

src/_pytest/recwarn.py:230–232  ·  view source on GitHub ↗

Clear the list of recorded warnings.

(self)

Source from the content-addressed store, hash-verified

228 raise AssertionError(f"{cls!r} not found in warning list")
229
230 def clear(self) -> None:
231 """Clear the list of recorded warnings."""
232 self._list[:] = []
233
234 # Type ignored because we basically want the `catch_warnings` generic type
235 # parameter to be ourselves but that is not possible(?).

Callers 1

test_recordingMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_recordingMethod · 0.76