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

Function _calls

tests/test_python_pytest_fixture_receivers.py:19–30  ·  view source on GitHub ↗
(tmp_path: Path, files: dict[str, str])

Source from the content-addressed store, hash-verified

17
18
19def _calls(tmp_path: Path, files: dict[str, str]):
20 paths = []
21 for name, body in files.items():
22 p = tmp_path / name
23 p.parent.mkdir(parents=True, exist_ok=True)
24 p.write_text(body, encoding="utf-8")
25 paths.append(p)
26 r = extract(paths, root=tmp_path, cache_root=tmp_path / "graphify-out", parallel=False)
27 nodes = {n["id"]: n for n in r["nodes"]}
28 owner = {e["target"]: nodes[e["source"]]["label"] for e in r["edges"] if e["relation"] == "method"}
29 return {(nodes[e["source"]]["label"], owner.get(e["target"], ""), nodes[e["target"]]["label"])
30 for e in r["edges"] if e["relation"] == "calls"}, r
31
32
33_CONFTEST = "import pytest\nfrom app.testing import CliRunner\n\n\n@pytest.fixture\ndef runner():\n return CliRunner()\n"

Calls 3

extractFunction · 0.90
itemsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected