(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
| 571 | |
| 572 | |
| 573 | def test_precommit_cli_forwards_quality_config(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: |
| 574 | _write_skill(tmp_path / "skills", "config-skill") |
| 575 | (tmp_path / "quality.yaml").write_text("expected_headers: []\n", encoding="utf-8") |
| 576 | monkeypatch.chdir(tmp_path) |
| 577 | runner = CliRunner() |
| 578 | path = "skills/config-skill/SKILL.md" |
| 579 | |
| 580 | default = runner.invoke(cli, ["precommit-run", "quality", "--min-score", "0", path]) |
| 581 | # pre-commit appends hook args after the entry, then filenames. |
| 582 | configured = runner.invoke( |
| 583 | cli, ["precommit-run", "quality", "--min-score", "0", "--quality-config", "quality.yaml", path] |
| 584 | ) |
| 585 | |
| 586 | assert default.exit_code == 0, default.output |
| 587 | assert configured.exit_code == 0, configured.output |
| 588 | assert _score_from_line(configured.output) > _score_from_line(default.output) |
| 589 | |
| 590 | |
| 591 | def test_precommit_cli_rejects_invalid_quality_config(tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected