(tmp_path, nodes, links)
| 419 | |
| 420 | |
| 421 | def _write_nodes(tmp_path, nodes, links): |
| 422 | gp = tmp_path / "graph.json" |
| 423 | gp.write_text(json.dumps({ |
| 424 | "directed": False, "multigraph": False, "graph": {}, |
| 425 | "nodes": [ |
| 426 | {"id": i, "label": lbl, "source_file": sf, "source_location": loc} |
| 427 | for i, lbl, sf, loc in nodes |
| 428 | ], |
| 429 | "links": [ |
| 430 | {"source": a, "target": b, "relation": rel, "confidence": "EXTRACTED"} |
| 431 | for a, b, rel in links |
| 432 | ], |
| 433 | })) |
| 434 | return gp |
| 435 | |
| 436 | |
| 437 | def _same_file_twin_graph(tmp_path): |
no outgoing calls
no test coverage detected