(monkeypatch, graph_path, flags)
| 241 | assert not out.startswith("Usage: graphify explain") |
| 242 | # Project query defaults share the selected graph's identity, not process CWD. |
| 243 | def _capture_query_settings(monkeypatch, graph_path, flags): |
| 244 | captured = {} |
| 245 | |
| 246 | def query(_graph, _question, **kwargs): |
| 247 | captured["execution"] = kwargs |
| 248 | return "captured query result" |
| 249 | |
| 250 | def log(**kwargs): |
| 251 | captured["log"] = kwargs |
| 252 | |
| 253 | monkeypatch.setattr("graphify.serve._query_graph_text", query) |
| 254 | monkeypatch.setattr("graphify.querylog.log_query", log) |
| 255 | monkeypatch.setattr(mainmod, "_check_skill_version", lambda _: None) |
| 256 | monkeypatch.setattr(mainmod.sys, "argv", [ |
| 257 | "graphify", "query", "extract", "--graph", str(graph_path), *flags, |
| 258 | ]) |
| 259 | mainmod.main() |
| 260 | return captured |
| 261 | |
| 262 | |
| 263 | @pytest.mark.parametrize("settings, flags, expected", [ |
no outgoing calls
no test coverage detected