SPB Git

spb/wp35_uqo

Public
502 B · 14 lines python
1import hashlib, json2from pathlib import Path3ROOT = Path(__file__).resolve().parents[1]45def test_registry_hashes_match_raw_files():6    reg = json.loads((ROOT / "data/metadata/source_registry.json").read_text())7    assert len(reg) >= 88    for k, rec in reg.items():9        p = ROOT / rec["local_path"]10        if not p.exists():   # raw files are not committed; skip on a fresh clone11            continue12        h = hashlib.sha256(p.read_bytes()).hexdigest()13        assert h == rec["sha256"], k14
Files · 86214492b606a451a02d40b10d997c064a573903
Menu

Theme