(tmp_path: Path)
| 13 | |
| 14 | |
| 15 | def _graph(tmp_path: Path): |
| 16 | src = tmp_path / "facade.ex" |
| 17 | src.write_text( |
| 18 | "defmodule Facade do\n" |
| 19 | " defdelegate start(x), to: Worker\n" |
| 20 | " defdelegate stop(x), to: Worker, as: :halt\n" |
| 21 | " def run(x) do\n" |
| 22 | " start(x)\n" |
| 23 | " stop(x)\n" |
| 24 | " end\n" |
| 25 | "end\n", |
| 26 | encoding="utf-8", |
| 27 | ) |
| 28 | result = extract([src], cache_root=tmp_path / "graphify-out") |
| 29 | label = {n["id"]: n["label"] for n in result["nodes"]} |
| 30 | return result, label |
| 31 | |
| 32 | |
| 33 | def _edges(result, label, relation): |
no test coverage detected