(tmp_path, files: dict[str, str])
| 48 | |
| 49 | |
| 50 | def _calls(tmp_path, files: dict[str, str]): |
| 51 | for name, body in files.items(): |
| 52 | (tmp_path / name).write_text(body, encoding="utf-8") |
| 53 | with redirect_stdout(io.StringIO()): |
| 54 | r = extract([tmp_path / n for n in files], cache_root=Path(tempfile.mkdtemp()), |
| 55 | root=tmp_path, parallel=False) |
| 56 | def norm(label): |
| 57 | return str(label).strip(".").removesuffix("()") |
| 58 | labels = {n["id"]: norm(n["label"]) for n in r["nodes"]} |
| 59 | return {(labels.get(e["source"]), labels.get(e["target"])) |
| 60 | for e in r["edges"] if e.get("relation") == "calls"}, r |
| 61 | |
| 62 | |
| 63 | def test_every_parameter_form_resolves_like_the_local_does(tmp_path): |
no test coverage detected