evaluate fresh Flemish remediation training
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-08-10 03:47:51 +02:00
parent b068a5e065
commit 98188e0a44
20 changed files with 5120 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
from pathlib import Path
import pytest
from scripts.export_experimental_yolo_train_shard import (
is_canonical_train_window,
validate_experimental_request,
)
from scripts.train_experimental_yolo_candidate import validate_paths
def test_export_refuses_non_experimental_output(tmp_path: Path) -> None:
manifest = tmp_path / "manifest.json"
manifest.write_text("{}", encoding="utf-8")
with pytest.raises(ValueError, match="output must remain"):
validate_experimental_request(manifest, tmp_path / "output")
def test_training_refuses_paths_outside_experimental_root(tmp_path: Path) -> None:
with pytest.raises(ValueError, match="must remain"):
validate_paths(tmp_path / "dataset", tmp_path / "output")
def test_train_shard_rejects_near_duplicate_edge_cover_windows() -> None:
canonical = {"row_off": 512, "col_off": 0, "height": 512, "width": 512}
edge_cover = {"row_off": 513, "col_off": 0, "height": 512, "width": 512}
assert is_canonical_train_window(canonical, 512)
assert not is_canonical_train_window(edge_cover, 512)