Files
geointel/backend/tests/test_sprint159_split_promotion_workflow.py
T
Codex 947ad6784d
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled
Add split background promotion workflow
2026-07-10 12:12:50 +02:00

30 lines
1.1 KiB
Python

from __future__ import annotations
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def test_split_background_promotion_workflow_runs_split_then_split_aware_report() -> None:
script_path = ROOT / "scripts" / "run_split_background_promotion_workflow.sh"
assert script_path.exists()
source = script_path.read_text(encoding="utf-8")
assert "run_background_corpus_split_matrix.sh" in source
assert "build_detection_model_promotion_report.py" in source
assert "--background-split-summary" in source
assert "background_corpus_split_summary.json" in source
assert "PROMOTION_POSITIVE_PORTFOLIO_PATH" in source
assert "BACKGROUND_SPLIT_OUTPUT_DIR" in source
assert "PROMOTION_OUTPUT_DIR" in source
assert "--hard-negative-summary" not in source
assert "download model" not in source.lower()
assert "promote model default" not in source.lower()
def test_readiness_checks_split_background_promotion_workflow_syntax() -> None:
readiness = (ROOT / "scripts" / "run_readiness_check.sh").read_text(encoding="utf-8")
assert "bash -n scripts/run_split_background_promotion_workflow.sh" in readiness