MCPcopy Create free account
hub / github.com/pytest-dev/pytest / clear

Method clear

src/_pytest/recwarn.py:196–198  ·  view source on GitHub ↗

Clear the list of recorded warnings.

(self)

Source from the content-addressed store, hash-verified

194 raise AssertionError("%r not found in warning list" % cls)
195
196 def clear(self) -> None:
197 """Clear the list of recorded warnings."""
198 self._list[:] = []
199
200 # Type ignored because it doesn't exactly warnings.catch_warnings.__enter__
201 # -- it returns a List but we only emulate one.

Callers 1

test_recordingMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_recordingMethod · 0.76