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

Function _extract_dir

tests/test_indirect_dispatch.py:186–201  ·  view source on GitHub ↗
(tmp_path, files: dict[str, str])

Source from the content-addressed store, hash-verified

184# the name resolves to exactly one real callable (the single-definition guard).
185
186def _extract_dir(tmp_path, files: dict[str, str]):
187 base = tmp_path / "pkg"
188 base.mkdir()
189 for name, body in files.items():
190 (base / name).write_text(body)
191 old = os.getcwd()
192 try:
193 os.chdir(tmp_path)
194 r = extract(
195 [Path("pkg") / name for name in files],
196 cache_root=Path(".cache"), parallel=False,
197 )
198 finally:
199 os.chdir(old)
200 nid = {n["label"].rstrip("()"): n["id"] for n in r["nodes"]}
201 return r, nid
202
203
204def test_cross_file_indirect_survives_id_relativization(tmp_path):

Calls 2

extractFunction · 0.90
itemsMethod · 0.45

Tested by

no test coverage detected