Write a minimal hand-rolled directed graph.json for path-direction tests.
(tmp_path: Path, nodes: list[str], links: list[dict])
| 468 | # ── graphify path direction (#2487) ───────────────────────────────────────── |
| 469 | |
| 470 | def _write_path_graph(tmp_path: Path, nodes: list[str], links: list[dict]) -> Path: |
| 471 | """Write a minimal hand-rolled directed graph.json for path-direction tests.""" |
| 472 | out = tmp_path / "graphify-out" |
| 473 | out.mkdir() |
| 474 | (out / "graph.json").write_text(json.dumps({ |
| 475 | "directed": True, |
| 476 | "multigraph": False, |
| 477 | "graph": {}, |
| 478 | "nodes": [{"id": n, "label": n} for n in nodes], |
| 479 | "links": links, |
| 480 | })) |
| 481 | return out |
| 482 | |
| 483 | |
| 484 | def _calls(src: str, tgt: str) -> dict: |
no outgoing calls
no test coverage detected