From c431d82c0dec39d871ab8fd63705acc8080c5588 Mon Sep 17 00:00:00 2001 From: agentson Date: Sun, 1 Mar 2026 22:44:02 +0900 Subject: [PATCH] test: cover no-readonly-change early return in governance validator --- tests/test_validate_governance_assets.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_validate_governance_assets.py b/tests/test_validate_governance_assets.py index 398c677..3f2ff21 100644 --- a/tests/test_validate_governance_assets.py +++ b/tests/test_validate_governance_assets.py @@ -176,3 +176,14 @@ def test_validate_read_only_approval_warns_without_pr_body(monkeypatch) -> None: assert errors == [] assert warnings assert "approval evidence check skipped" in warnings[0] + + +def test_validate_read_only_approval_skips_when_no_readonly_file_changed() -> None: + module = _load_module() + changed_files = ["src/main.py"] + errors: list[str] = [] + warnings: list[str] = [] + + module.validate_read_only_approval(changed_files, errors, warnings) + assert errors == [] + assert warnings == []