Download tests/mp_opd_source_checks.py from codemaivanngu/ctopd: direct link, hf CLI and curl.
- Browser
- Download file 522 Bytes
-
https://huggingface.co/codemaivanngu/ctopd/resolve/main/tests/mp_opd_source_checks.py
- Command line
-
hf download hf://codemaivanngu/ctopd/tests/mp_opd_source_checks.py
-
curl -L -o mp_opd_source_checks.py https://huggingface.co/codemaivanngu/ctopd/resolve/main/tests/mp_opd_source_checks.py
522 Bytes
| """Keep historical freeze manifests while auditing the explicitly patched adapter.""" | |
| import hashlib | |
| import json | |
| def assert_source_hash(case, root, row): | |
| expected = row['sha256'] | |
| if row['path'] == 'kdflow/algorithms/mp_opd.py': | |
| patch = json.loads((root / 'docs/MP_OPD_INVALID_RESPONSES.json').read_text()) | |
| case.assertEqual(expected, patch['baseline_sha256']) | |
| expected = patch['updated_sha256'] | |
| case.assertEqual(hashlib.sha256((root / row['path']).read_bytes()).hexdigest(), expected) | |