Files
geointel/backend/tests/test_sprint132_operator_hard_negative_matrix.py
T
Codex 558c17129b
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled
Add operator hard-negative detection matrix
2026-07-07 22:07:56 +02:00

28 lines
1.1 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def test_operator_hard_negative_matrix_scores_background_samples_without_qa() -> None:
script_path = ROOT / "scripts" / "run_operator_hard_negative_detection_matrix.sh"
readiness = (ROOT / "scripts" / "run_readiness_check.sh").read_text(encoding="utf-8")
assert script_path.exists()
script = script_path.read_text(encoding="utf-8")
assert "bash -n scripts/run_operator_hard_negative_detection_matrix.sh" in readiness
assert "OPERATOR_SAMPLE_MANIFEST_PATH" in script
assert "OPERATOR_BACKGROUND_SAMPLE_SLUGS" in script
assert "background_candidate" in script
assert "allow_empty_reference" in script
assert "/api/v1/detection/run" in script
assert "/api/v1/detection/runs/${analysis_run_id}/detections" in script
assert "hard_negative_matrix_summary.json" in script
assert "false_positive_pressure" in script
assert "best_by_lowest_pressure" in script
assert "REAL_REFERENCE_VECTOR_PATH" not in script
assert "/qa/reference" not in script
assert "fixture_mode" not in script
assert "demo/workflow" not in script