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

Function _graph

tests/test_csharp_directive_encoding.py:50–61  ·  view source on GitHub ↗
(tmp_path: Path, data: bytes)

Source from the content-addressed store, hash-verified

48
49
50def _graph(tmp_path: Path, data: bytes):
51 tmp_path.mkdir(parents=True, exist_ok=True)
52 (tmp_path / "Order.cs").write_bytes(data)
53 old = os.getcwd()
54 try:
55 os.chdir(tmp_path)
56 r = extract([Path("Order.cs")], cache_root=tmp_path / ".cache")
57 finally:
58 os.chdir(old)
59 nodes = {(n["id"], n["label"]) for n in r["nodes"]}
60 edges = {(e["source"], e["target"], e["relation"]) for e in r["edges"]}
61 return nodes, edges
62
63
64@pytest.mark.parametrize("encoding", list(ENCODINGS))

Calls 1

extractFunction · 0.90

Tested by

no test coverage detected