Promote focused small-building detector
This commit is contained in:
@@ -199,6 +199,28 @@ def test_false_negative_audit_finds_persistent_reference_misses(tmp_path: Path)
|
||||
assert candidate["false_negative_count"] == 1
|
||||
assert candidate["false_negative_rate"] == 1 / 3
|
||||
assert active["false_negative_area_m2"]["median"] > 0
|
||||
assert sample["persistent_false_negative_area_m2"]["count"] == 1
|
||||
assert sample["persistent_false_negative_area_m2"]["median"] > 0
|
||||
assert sum(
|
||||
bucket["count"] for bucket in sample["persistent_area_buckets"].values()
|
||||
) == 1
|
||||
assert sum(
|
||||
bucket["share"] for bucket in sample["persistent_area_buckets"].values()
|
||||
) == 1.0
|
||||
persistent_evidence = json.loads(
|
||||
(output_dir / "persistent_false_negatives.geojson").read_text(encoding="utf-8")
|
||||
)
|
||||
assert persistent_evidence["type"] == "FeatureCollection"
|
||||
assert len(persistent_evidence["features"]) == 1
|
||||
persistent_feature = persistent_evidence["features"][0]
|
||||
assert persistent_feature["properties"]["qa_evidence_role"] == "persistent_false_negative"
|
||||
assert persistent_feature["properties"]["sample_slug"] == "geel"
|
||||
assert persistent_feature["properties"]["persistent_reference_id"] == "source:persistent-small"
|
||||
assert persistent_feature["properties"]["area_m2"] > 0
|
||||
assert persistent_feature["properties"]["area_bucket"] in sample["persistent_area_buckets"]
|
||||
assert report["persistent_evidence_geojson_path"] == str(
|
||||
output_dir / "persistent_false_negatives.geojson"
|
||||
)
|
||||
assert report["recommendations"]
|
||||
assert (output_dir / "detection_false_negative_audit.md").is_file()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user