final_checks.py

back to table · edit · history · where entries came from · files · download

569 bytes, as of the version from 2026-11-18 20:44 (current). Recorded here, not run.

"""Bind executable checks to the final stored document, including Programs."""
import json,sys
from pathlib import Path
root=Path(__file__).resolve().parent
ns={};d=json.loads((root/'stored.json').read_text());exec(d['Programs']['mpmath-example']['code'],ns)
from generate import selection,triangle_measure
assert ns['reference_sides']()==selection()
v=triangle_measure(5,5,9);assert abs(ns['mu'](5,5,9)-ns['mp'].mpf(str(v.mid()))) < ns['mp'].mpf('1e-125')
print('PROGRAM_EXAMPLE passed enumeration and 5-5-9 value')
import enclosure_checks
import checks
checks.main()