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

Function _calls

tests/test_python_module_call_exact_name.py:27–35  ·  view source on GitHub ↗
(tmp_path: Path, caller_body: str)

Source from the content-addressed store, hash-verified

25
26
27def _calls(tmp_path: Path, caller_body: str) -> list[tuple[str, str, str]]:
28 (tmp_path / "core_schema.py").write_text(_CORE, encoding="utf-8")
29 (tmp_path / "caller.py").write_text(caller_body, encoding="utf-8")
30 result = extract([tmp_path / "caller.py", tmp_path / "core_schema.py"], root=tmp_path,
31 cache_root=tmp_path / "graphify-out", parallel=False)
32 label = {n["id"]: n["label"] for n in result["nodes"]}
33 return [(label.get(e["source"], ""), label.get(e["target"], ""), e["confidence"])
34 for e in result["edges"]
35 if e["relation"] == "calls" and label.get(e["source"]) == "build()"]
36
37
38def test_a_function_beside_a_same_key_class_resolves_by_its_exact_name(tmp_path: Path):

Calls 2

extractFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected