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

Function test_precommit_does_not_write_reports

tests/test_precommit.py:301–312  ·  view source on GitHub ↗
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch, check: str)

Source from the content-addressed store, hash-verified

299
300@pytest.mark.parametrize("check", CHECKS)
301def test_precommit_does_not_write_reports(tmp_path: Path, monkeypatch: pytest.MonkeyPatch, check: str) -> None:
302 monkeypatch.chdir(tmp_path)
303 skill = _write_skill(tmp_path, "sample-skill")
304 script = skill / "scripts" / "run.py"
305 script.parent.mkdir()
306 script.write_text("print(1)\n", encoding="utf-8")
307 before = sorted(tmp_path.rglob("*"))
308
309 code, _lines = run_precommit(check, [str(skill / "SKILL.md"), str(script)], min_score=0, cwd=tmp_path)
310
311 assert code == 0
312 assert sorted(tmp_path.rglob("*")) == before
313
314
315def test_precommit_fails_when_an_earlier_skill_fails(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