MCPcopy Create free account
hub / github.com/NVIDIA/SkillEvaluator / test_precommit_schema_exit_codes

Function test_precommit_schema_exit_codes

tests/test_precommit.py:239–253  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

237
238
239def test_precommit_schema_exit_codes(tmp_path: Path) -> None:
240 valid = _write_skill(tmp_path, "valid-skill")
241 invalid = _write_skill(
242 tmp_path,
243 "broken-skill",
244 body="# Broken\n\nNo frontmatter.\n",
245 )
246
247 code, lines = run_precommit("schema", [str(valid / "SKILL.md")], cwd=tmp_path)
248 assert code == 0
249 assert lines == ["PASS valid-skill schema"]
250
251 code, lines = run_precommit("schema", [str(invalid / "SKILL.md")], cwd=tmp_path)
252 assert code == 1
253 assert lines[0].startswith("FAIL broken-skill schema ")
254
255
256def test_precommit_lint_scripts_is_advisory_pass(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 2

run_precommitFunction · 0.90
_write_skillFunction · 0.70

Tested by

no test coverage detected