fix: check the event schema under the given root

validate_schemas.py read install-events.schema.json from the real tree while a test pointed ROOT at a scratch one, and test_schema_semantic_gate.py called unittest.main() before its last class.
This commit is contained in:
Abdessamad Derraz committed 2026-10-23 19:23:59 +02:00
1 parent b34a6058f7
commit 7143d20ef8
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -558,7 +558,7 @@ def _event_schema_errors() -> list[str]:
"""install-events.schema.json is EVENT_KEYS written out, and a valid schema."""
import generate_event_schema # noqa: PLC0415
path = generate_event_schema.OUTPUT
path = ROOT / "schemas" / generate_event_schema.OUTPUT.name
label = path.relative_to(ROOT).as_posix()
if not path.is_file():
return [f"{label}: missing, run python scripts/generate_event_schema.py"]
@@ -567,7 +567,7 @@ def _event_schema_errors() -> list[str]:
):
return [f"{label}: differs from EVENT_KEYS in install.py, run "
"python scripts/generate_event_schema.py"]
_validator(path.name)
Draft202012Validator.check_schema(_load_json(path))
return []