"""Run all three checks and compare each complete output with its reference.""" import json import subprocess import sys from pathlib import Path def main(): root = Path(__file__).resolve().parent expected = json.loads((root / "expected-output.json").read_text(encoding="utf-8")) for name in ("check_mixed.py", "check_symbolic.py", "independent_checks.py"): result = subprocess.run( [sys.executable, "-E", "-B", str(root / "checks" / name)], check=True, stdout=subprocess.PIPE, ) if result.stdout != expected[name].encode("utf-8"): raise SystemExit(f"{name} produced different output from its reference.") print(f"{name} matched its complete expected output.") if __name__ == "__main__": main()