2025-07-25 14:01:34 -04:00
|
|
|
import hashlib
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
import yaml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_modification_time():
|
|
|
|
|
# Ensure hash map consistency
|
2025-08-05 10:50:32 -04:00
|
|
|
hash_path = Path("utils/autogen_hash.yaml")
|
2025-07-25 14:01:34 -04:00
|
|
|
with open(hash_path, "r") as f:
|
|
|
|
|
hash_map = yaml.safe_load(f)
|
|
|
|
|
for file, hash in hash_map.items():
|
|
|
|
|
file_hash = hashlib.sha256(Path(file).read_bytes()).hexdigest()
|
2025-08-08 15:32:30 -04:00
|
|
|
assert file_hash == hash, (
|
|
|
|
|
f"Hash mismatch for {file}: expected {hash}, got {file_hash}"
|
|
|
|
|
)
|