Files
troupe-standup/wizard-work/spark/verify_result.py
T

17 lines
598 B
Python

#!/usr/bin/env python3
import json
def _check(cond, msg):
"""A failure path `-O` cannot compile away (Q63: assert-only files exit 0 under -O)."""
if not cond:
raise RuntimeError(msg)
with open("/root/.hermes/wizard-outputs/spark/scrape_result.json") as f:
# subject: /root/.hermes/wizard-outputs/spark/scrape_result.json -- grades the live tree outside the repo by design (not a repo fixture)
data = json.load(f)
_check(data["title"] == "Example Domain", f"wrong title: {data['title']}")
_check(data["status"] == "success", f"wrong status: {data['status']}")
print("VALID")