10 lines
421 B
Python
10 lines
421 B
Python
from pathlib import Path
|
|
import json
|
|
ROOT=Path(__file__).resolve().parents[1]
|
|
fixture_dir=ROOT/"fixtures"/"geojson"
|
|
if not fixture_dir.exists(): raise SystemExit("fixtures/geojson missing")
|
|
for path in fixture_dir.glob("*.geojson"):
|
|
data=json.loads(path.read_text(encoding="utf-8"))
|
|
if data.get("type") != "FeatureCollection": raise SystemExit(f"{path} is not a FeatureCollection")
|
|
print("Fixture validation OK")
|