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 | |
| 286 | def 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
Tested by
no test coverage detected