Skip to content

Commit

Permalink
Improve exception on process id mismatch in indiv process testing exa…
Browse files Browse the repository at this point in the history
…mples json5 files
  • Loading branch information
soxofaan committed Jan 25, 2024
1 parent d67313f commit cd0a0e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/openeo_test_suite/lib/process_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def _load(self) -> Iterator[ProcessData]:
try:
with path.open() as f:
data = json5.load(f)
assert data["id"] == path.stem
if data["id"] != path.stem:
raise ValueError(
f"Process id mismatch between id {data['id']!r} and filename {path.name!r}"
)
yield ProcessData(
process_id=data["id"],
level=data.get("level"),
Expand Down

0 comments on commit cd0a0e7

Please sign in to comment.