You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
581 B
10 lines
581 B
"""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
|
|
|