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

Function test_clear

testing/logging/test_fixture.py:286–293  ·  testing/logging/test_fixture.py::test_clear
(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(class="st">"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