#!/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: 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")