15 lines
568 B
Python
15 lines
568 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
|
|
|
|
def _check(cond, msg="check failed"):
|
|
"""Explicit failure path -- survives `python3 -O`, where `assert` is compiled away."""
|
|
if not cond:
|
|
raise SystemExit(f"FAIL: {msg}")
|
|
|
|
report = json.load(open('/root/.hermes/wizard-outputs/spark/validation_report.json'))
|
|
_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) |