Download tests/test_failures.py from devildasdf/NEXORA: direct link, hf CLI and curl.
- Browser
- Download file 850 Bytes
-
https://huggingface.co/devildasdf/NEXORA/resolve/main/tests/test_failures.py
- Command line
-
hf download hf://devildasdf/NEXORA/tests/test_failures.py
-
curl -L -o test_failures.py https://huggingface.co/devildasdf/NEXORA/resolve/main/tests/test_failures.py
850 Bytes
| import json | |
| import pytest | |
| from nexora.failures import FailureStore | |
| def test_failure_admission_requires_evidence(tmp_path): | |
| s = FailureStore(tmp_path) | |
| with pytest.raises(PermissionError): | |
| s.capture("code", "Incorrect output", "local test") | |
| rid = s.capture("code", "Incorrect output", "original synthetic test", consent=True) | |
| with pytest.raises(ValueError): | |
| s.advance(rid, "candidate", "skip validation", training_approved=True) | |
| for stage in ["classified", "reproduced", "minimized", "test_added"]: | |
| s.advance(rid, stage, "Independent test record") | |
| with pytest.raises(PermissionError): | |
| s.advance(rid, "candidate", "Test evidence") | |
| s.advance(rid, "candidate", "Provenance reviewed", training_approved=True) | |
| assert json.loads((tmp_path / (rid + ".json")).read_text())["training_approved"] | |