#!/usr/bin/env python3 """Run the pure T2 unit tests (no Docker, no model, no real benchmark task) with a time cap. Opt-in container tests in tests/test_e2e_container.py run only when PVBENCH_IMAGE is set. """ import subprocess import sys from pathlib import Path ROOT = Path(__file__).resolve().parents[1] try: result = subprocess.run([sys.executable, "-B", "-m", "unittest", *(sys.argv[1:] or ["discover", "-s", "tests", "-v"])], cwd=ROOT, timeout=600) except subprocess.TimeoutExpired: print("unit tests exceeded 600 s", file=sys.stderr) raise SystemExit(1) raise SystemExit(result.returncode)