Files
SignageSystem/tests/test_application_source_regression.py
T
2026-08-09 21:41:44 +09:00

11 lines
581 B
Python

"""Source-level guard for a GUI callback regression that occurred before first frame."""
from pathlib import Path
def test_runtime_callback_does_not_reference_screenshot_path() -> None:
source = (Path(__file__).parents[1] / "src" / "application.py").read_text(encoding="utf-8")
callback_body = source.split("def _emit_runtime_update", 1)[1]
assert "Saved screenshot" not in callback_body
screenshot_body = source.split("def _save_screenshot", 1)[1].split("def _emit_runtime_update", 1)[0]
assert 'LOGGER.info("Saved screenshot: %s", path)' in screenshot_body