#!/usr/bin/env python3 """Recompute every claim and print one card's observed check.""" import contextlib,io,sys from pathlib import Path import study if len(sys.argv)!=2 or not sys.argv[1].isdigit() or not 1<=int(sys.argv[1])<=6:raise SystemExit('usage: python3 claim.py 1..6') with contextlib.redirect_stdout(io.StringIO()):ok=study.checks() line=(Path(__file__).resolve().parents[1]/'evidence/check-table.md').read_text().splitlines()[int(sys.argv[1])+1] print(line.split(' | ',2)[-1]) raise SystemExit(0 if ok and ' | PASS | ' in line else 1)