Run `graphify affected ` and return its exit code (0 when it returns).
(monkeypatch, graph_path: str, query: str)
| 103 | |
| 104 | |
| 105 | def _run_affected(monkeypatch, graph_path: str, query: str) -> int: |
| 106 | """Run `graphify affected <query>` and return its exit code (0 when it returns).""" |
| 107 | monkeypatch.setattr(mainmod, "_check_skill_version", lambda _: None) |
| 108 | monkeypatch.setattr( |
| 109 | mainmod.sys, "argv", ["graphify", "affected", query, "--graph", graph_path] |
| 110 | ) |
| 111 | try: |
| 112 | mainmod.main() |
| 113 | except SystemExit as exc: # only the failure paths exit explicitly |
| 114 | return int(exc.code or 0) |
| 115 | return 0 |
| 116 | |
| 117 | |
| 118 | def test_affected_cli_resolves_path_scoped_symbol(tmp_path, monkeypatch, capsys): |
no outgoing calls
no test coverage detected