(caplog: pytest.LogCaptureFixture)
| 10 | |
| 11 | |
| 12 | def test_first_call_logs(caplog: pytest.LogCaptureFixture) -> None: |
| 13 | logger = logging.getLogger('crawlee.tests.log_dedup_first') |
| 14 | logger_once = LoggerOnce(logger) |
| 15 | with caplog.at_level(logging.INFO, logger=logger.name): |
| 16 | logger_once.log('first', key='k1') |
| 17 | assert [r.getMessage() for r in caplog.records] == ['first'] |
| 18 | |
| 19 | |
| 20 | def test_duplicate_key_is_suppressed(caplog: pytest.LogCaptureFixture) -> None: |
nothing calls this directly
no test coverage detected