(tmp_path)
| 15 | |
| 16 | |
| 17 | def _write_graph(tmp_path): |
| 18 | G = nx.Graph() |
| 19 | G.add_node("n1", label="extract", source_file="extract.py", source_location="L10", community=0) |
| 20 | G.add_node("n2", label="cluster", source_file="cluster.py", source_location="L5", community=0) |
| 21 | G.add_node("n3", label="build", source_file="build.py", source_location="L1", community=1) |
| 22 | G.add_edge("n1", "n2", relation="calls", confidence="EXTRACTED", context="call") |
| 23 | G.add_edge("n2", "n3", relation="imports", confidence="EXTRACTED", context="import") |
| 24 | graph_path = tmp_path / "graph.json" |
| 25 | graph_path.write_text(json.dumps(json_graph.node_link_data(G, edges="links"))) |
| 26 | return graph_path |
| 27 | |
| 28 | |
| 29 | @pytest.mark.parametrize("mode", [[], ["--dfs"]]) |
no test coverage detected