18 lines
688 B
Python
18 lines
688 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)
|
|
|
|
|
|
report = json.load(open('/root/.hermes/wizard-outputs/spark/validation_report.json'))
|
|
# subject: /root/.hermes/wizard-outputs/spark/validation_report.json -- grades the live tree outside the repo by design (not a repo fixture)
|
|
_check(report['summary']['valid_count'] == 1, "Expected 1 valid file")
|
|
_check(report['summary']['invalid_count'] == 1, "Expected 1 invalid file")
|
|
_check(report['test_passed'] == True, "Test should be marked as passed")
|
|
print("All assertions passed")
|
|
exit(0)
|