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

Function test_log_access

testing/logging/test_fixture.py:242–247  ·  testing/logging/test_fixture.py::test_log_access
(caplog: pytest.LogCaptureFixture)

Source from the content-addressed store, hash-verified

240
241
242def test_log_access(caplog: pytest.LogCaptureFixture) -> None:
243 caplog.set_level(logging.INFO)
244 logger.info(class="st">"boo %s", class="st">"arg")
245 assert caplog.records[0].levelname == class="st">"INFO"
246 assert caplog.records[0].msg == class="st">"boo %s"
247 assert class="st">"boo arg" in caplog.text
248
249
250def test_messages(caplog: pytest.LogCaptureFixture) -> None:

Callers

nothing calls this directly

Calls 1

set_levelMethod · 0.80

Tested by

no test coverage detected