Files
adamfandClaude Opus 5.5 3017cac31b Add tests for parsing, image loading, display detection and CLI
Tesseract is stubbed out except in one end-to-end smoke test on a sample
photo, which is skipped when the binary is not installed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 11:46:19 +01:00

21 lines
539 B
Python

from pathlib import Path
import cv2 as cv
import numpy as np
import pytest
@pytest.fixture
def monitor_photo() -> np.ndarray:
"""A synthetic photo: dark background with one light, square 'display'."""
arr = np.full((600, 800, 3), 30, dtype=np.uint8)
cv.rectangle(arr, (300, 200), (500, 400), (200, 200, 200), thickness=-1)
return arr
@pytest.fixture
def monitor_photo_path(tmp_path: Path, monitor_photo: np.ndarray) -> Path:
path = tmp_path / "monitor.png"
cv.imwrite(str(path), monitor_photo)
return path