import pytest from fastapi.testclient import TestClient from main import app @pytest.fixture(scope="session") def client(): """TestClient that runs the full app lifespan (loads SAT + ONNX models once).""" with TestClient(app) as c: yield c