Implement AXIS parity UI and execution baseline
This commit is contained in:
21
scripts/test_rs274_s1b_report.py
Normal file
21
scripts/test_rs274_s1b_report.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import hashlib
|
||||
import json
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
import generate_rs274_s1b_report
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
class Rs274S1bTests(unittest.TestCase):
|
||||
def test_report(self):
|
||||
report = json.loads((ROOT / "coverage/rs274-s1b.report.json").read_text())
|
||||
self.assertEqual(report["schema"], "rs274-s1b-report.v1")
|
||||
self.assertEqual(report["status"], "verified")
|
||||
self.assertIn("G10 L2 coordinate offsets", report["features"])
|
||||
|
||||
def test_hash(self):
|
||||
report = json.loads((ROOT / "coverage/rs274-s1b.report.json").read_text())
|
||||
unsigned = dict(report)
|
||||
actual = unsigned.pop("report_sha256")
|
||||
self.assertEqual(actual, hashlib.sha256(generate_rs274_s1b_report.canonical(unsigned).encode()).hexdigest())
|
||||
Reference in New Issue
Block a user