(tmp_path: Path, files: dict[str, str])
| 17 | |
| 18 | |
| 19 | def _calls(tmp_path: Path, files: dict[str, str]): |
| 20 | paths = [] |
| 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 | paths.append(p) |
| 26 | r = extract(paths, root=tmp_path, cache_root=tmp_path / "graphify-out", parallel=False) |
| 27 | nodes = {n["id"]: n for n in r["nodes"]} |
| 28 | owner = {e["target"]: nodes[e["source"]]["label"] for e in r["edges"] if e["relation"] == "method"} |
| 29 | return {(nodes[e["source"]]["label"], owner.get(e["target"], ""), nodes[e["target"]]["label"]) |
| 30 | for e in r["edges"] if e["relation"] == "calls"}, r |
| 31 | |
| 32 | |
| 33 | _CONFTEST = "import pytest\nfrom app.testing import CliRunner\n\n\n@pytest.fixture\ndef runner():\n return CliRunner()\n" |
no test coverage detected