MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _invoke

Function _invoke

tests/test_search_hook_scope.py:12–22  ·  view source on GitHub ↗
(monkeypatch, project, tool_input)

Source from the content-addressed store, hash-verified

10
11
12def _invoke(monkeypatch, project, tool_input):
13 monkeypatch.chdir(project)
14 monkeypatch.setenv("CLAUDE_PROJECT_DIR", str(project))
15 monkeypatch.delenv("GRAPHIFY_OUT", raising=False)
16 monkeypatch.setattr(sys, "stdin", io.TextIOWrapper(io.BytesIO(json.dumps({
17 "session_id": "scope-test", "tool_input": tool_input,
18 }).encode())))
19 output = io.StringIO()
20 monkeypatch.setattr(sys, "stdout", output)
21 _run_hook_guard("search")
22 return output.getvalue()
23
24
25@pytest.fixture

Calls 1

_run_hook_guardFunction · 0.90

Tested by

no test coverage detected