(tmp_path: Path, files: dict[str, str])
| 32 | |
| 33 | |
| 34 | def _edges(tmp_path: Path, files: dict[str, str]): |
| 35 | paths = [] |
| 36 | for name, body in files.items(): |
| 37 | p = tmp_path / name |
| 38 | p.parent.mkdir(parents=True, exist_ok=True) |
| 39 | p.write_text(body, encoding="utf-8") |
| 40 | paths.append(p) |
| 41 | r = extract(paths, root=tmp_path, cache_root=tmp_path / "graphify-out", parallel=False) |
| 42 | nodes = {n["id"]: n for n in r["nodes"]} |
| 43 | owner = {e["target"]: nodes[e["source"]]["label"] for e in r["edges"] if e["relation"] == "method"} |
| 44 | return {(nodes[e["source"]]["label"], owner.get(e["target"], ""), nodes[e["target"]]["label"], e.get("context")) |
| 45 | for e in r["edges"] if e["relation"] in ("calls", "references")} |
| 46 | |
| 47 | |
| 48 | def test_self_property_read_in_its_own_class(tmp_path: Path): |
no test coverage detected