(tmp_path, files: dict[str, str])
| 18 | |
| 19 | |
| 20 | def _extract(tmp_path, files: dict[str, str]): |
| 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 | r = extract([tmp_path / n for n in files], cache_root=Path(tempfile.mkdtemp()), |
| 26 | root=tmp_path, parallel=False) |
| 27 | labels = {n["id"]: n["label"] for n in r["nodes"]} |
| 28 | call_edges = [e for e in r["edges"] if e["relation"] == "calls"] |
| 29 | calls = {(labels[e["source"]], labels[e["target"]]): e for e in call_edges} |
| 30 | return calls, r |
| 31 | |
| 32 | |
| 33 | def test_same_namespace_static_call_is_extracted_not_inferred(tmp_path): |
no test coverage detected