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

Function test_log_access

testing/logging/test_fixture.py:100–105  ·  view source on GitHub ↗
(caplog)

Source from the content-addressed store, hash-verified

98
99
100def test_log_access(caplog):
101 caplog.set_level(logging.INFO)
102 logger.info("boo %s", "arg")
103 assert caplog.records[0].levelname == "INFO"
104 assert caplog.records[0].msg == "boo %s"
105 assert "boo arg" in caplog.text
106
107
108def test_messages(caplog):

Callers

nothing calls this directly

Calls 1

set_levelMethod · 0.80

Tested by

no test coverage detected