| """Shared test helpers (not pytest-plugin).""" | |
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| from statement_to_tikz.ir import GeometryIR | |
| FIXTURES = Path(__file__).parent / "fixtures" | |
| def load_fixture(name: str) -> tuple[GeometryIR, str]: | |
| data = json.loads((FIXTURES / name).read_text(encoding="utf-8")) | |
| expected = data.pop("expected_mode", "exact") | |
| ir = GeometryIR.model_validate(data) | |
| ir.ensure_labels() | |
| return ir, expected | |