MCPcopy Create free account
hub / github.com/apify/crawlee-python / test_default_level_is_info

Function test_default_level_is_info

tests/unit/_utils/test_log.py:48–53  ·  view source on GitHub ↗
(caplog: pytest.LogCaptureFixture)

Source from the content-addressed store, hash-verified

46
47
48def test_default_level_is_info(caplog: pytest.LogCaptureFixture) -> None:
49 logger = logging.getLogger('crawlee.tests.log_dedup_default_level')
50 logger_once = LoggerOnce(logger)
51 with caplog.at_level(logging.DEBUG, logger=logger.name):
52 logger_once.log('msg', key='k')
53 assert caplog.records[-1].levelno == logging.INFO
54
55
56def test_log_emits_at_specified_level(caplog: pytest.LogCaptureFixture) -> None:

Callers

nothing calls this directly

Calls 2

logMethod · 0.95
LoggerOnceClass · 0.90

Tested by

no test coverage detected