MCPcopy Index your code
hub / github.com/pytest-dev/pytest / test_clear

Function test_clear

testing/logging/test_fixture.py:286–293  ·  view source on GitHub ↗
(caplog: pytest.LogCaptureFixture)

Source from the content-addressed store, hash-verified

284
285
286def test_clear(caplog: pytest.LogCaptureFixture) -> None:
287 caplog.set_level(logging.INFO)
288 logger.info("bū")
289 assert len(caplog.records)
290 assert caplog.text
291 caplog.clear()
292 assert not len(caplog.records)
293 assert not caplog.text
294
295
296@pytest.fixture

Callers

nothing calls this directly

Calls 2

set_levelMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…