MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / no_logs_gte_error

Function no_logs_gte_error

tests/conftest.py:92–101  ·  view source on GitHub ↗

Ensure no log messages with error severity or higher were reported during test execution.

(caplog)

Source from the content-addressed store, hash-verified

90
91@pytest.fixture(autouse=True)
92def no_logs_gte_error(caplog):
93 """Ensure no log messages with error severity or higher were reported during test execution."""
94 EXCLUDED_MODULES = set()
95 yield
96 errors = [
97 record
98 for record in caplog.get_records("call")
99 if record.levelno >= logging.ERROR and record.module not in EXCLUDED_MODULES
100 ]
101 assert not errors, "Test failed due to presence of one or more logs with ERROR severity."
102
103
104@pytest.fixture

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected