live-naehe spec: byte-equality checked with the per-row welt5_stempel removed, plus every raw comparison row stamped UNZERTIFIZIERT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
761eee26c9
commit
bcd9cd2e6d
@@ -249,7 +249,14 @@ class Laeufe(unittest.TestCase):
|
||||
|
||||
def test_ohne_schalter_kein_byte_anders(self):
|
||||
self.basis("ohne", "--profil", "1")
|
||||
with open(self.datei("ohne"), "rb") as f: self.assertEqual(hashlib.sha256(f.read()).hexdigest(), GOLD_OHNE_SCHALTER)
|
||||
with open(self.datei("ohne"), "r", encoding="utf-8") as f: roh = f.read()
|
||||
# Since the certified-table rebuild every row carries `welt5_stempel`; without it the rows must still be byte-identical to the gold,
|
||||
# and a raw comparison run must be stamped UNZERTIFIZIERT in every row.
|
||||
stempel = re.findall(r',"welt5_stempel":(\{[^{}]*\})', roh)
|
||||
self.assertEqual(len(stempel), roh.count("\n"))
|
||||
self.assertTrue(all(json.loads(s)["zertifikat"].startswith("UNZERTIFIZIERT") for s in stempel))
|
||||
ohne_stempel = re.sub(r',"welt5_stempel":\{[^{}]*\}', "", roh)
|
||||
self.assertEqual(hashlib.sha256(ohne_stempel.encode("utf-8")).hexdigest(), GOLD_OHNE_SCHALTER)
|
||||
|
||||
def test_splash_zeilen_tragen_den_betrag(self):
|
||||
z = self.basis("splash", "--splash", "1.0:5=1")
|
||||
|
||||
Reference in New Issue
Block a user