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

Method clear

src/_pytest/logging.py:437–439  ·  view source on GitHub ↗

Reset the list of log records and the captured log text.

(self)

Source from the content-addressed store, hash-verified

435 return [r.getMessage() for r in self.records]
436
437 def clear(self) -> None:
438 """Reset the list of log records and the captured log text."""
439 self.handler.reset()
440
441 def set_level(self, level: Union[int, str], logger: Optional[str] = None) -> None:
442 """Set the level of a logger for the duration of a test.

Callers

nothing calls this directly

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected