Spaces:
Sleeping
Sleeping
File size: 620 Bytes
18bfaa1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from eval.real_query_runner import build_deterministic_app, evaluate_case, format_results, load_cases # noqa: E402
def main() -> int:
app = build_deterministic_app()
# Return a nonzero exit code so this script can be used in automation.
results = [evaluate_case(app, case) for case in load_cases()]
print(format_results(results))
return 0 if all(result["passed"] for result in results) else 1
if __name__ == "__main__":
raise SystemExit(main())
|