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

Function _has_edge

tests/test_ts_import_require.py:24–30  ·  view source on GitHub ↗
(result: dict, source: str, target: str, relation: str = "imports_from")

Source from the content-addressed store, hash-verified

22
23
24def _has_edge(result: dict, source: str, target: str, relation: str = "imports_from") -> bool:
25 expected = (_file_node_id(Path(source)), _file_node_id(Path(target)), relation)
26 actual = {
27 (edge["source"], edge["target"], edge["relation"])
28 for edge in result["edges"]
29 }
30 return expected in actual
31
32
33def test_import_require_relative_emits_file_edge(tmp_path: Path):

Calls 1

_file_node_idFunction · 0.90

Tested by

no test coverage detected