Test whether ``edges_equal`` properly compares edges in multigraphs.
(n, gen, create_using)
| 299 | @pytest.mark.parametrize("gen", [nx.complete_graph, nx.path_graph, nx.cycle_graph]) |
| 300 | @pytest.mark.parametrize("create_using", [nx.MultiGraph, nx.MultiDiGraph]) |
| 301 | def test_edges_equal_multiedge(n, gen, create_using): |
| 302 | """Test whether ``edges_equal`` properly compares edges in multigraphs.""" |
| 303 | G = gen(n, create_using=create_using) |
| 304 | H = gen(n, create_using=create_using) |
| 305 | |
| 306 | G_edges = list(G.edges()) |
| 307 | G.add_edges_from(G_edges) |
| 308 | H.add_edges_from(G_edges) |
| 309 | assert edges_equal(G.edges(), H.edges(), directed=G.is_directed()) |
| 310 | |
| 311 | H.remove_edge(0, 1) |
| 312 | assert edges_equal(H.edges(), H.edges(), directed=H.is_directed()) |
| 313 | assert not edges_equal(G.edges(), H.edges(), directed=G.is_directed()) |
| 314 | |
| 315 | |
| 316 | @pytest.mark.parametrize("n", [5, 10, 20]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…