MCPcopy
hub / github.com/networkx/networkx / test_edges_equal

Function test_edges_equal

networkx/utils/tests/test_misc.py:285–295  ·  view source on GitHub ↗

Test whether edges_equal properly compares edges without attribute data.

(n, gen, create_using)

Source from the content-addressed store, hash-verified

283@pytest.mark.parametrize("gen", [nx.complete_graph, nx.path_graph, nx.cycle_graph])
284@pytest.mark.parametrize("create_using", [nx.Graph, nx.DiGraph])
285def test_edges_equal(n, gen, create_using):
286 """Test whether edges_equal properly compares edges without attribute data."""
287 G = gen(n, create_using=create_using)
288 H = gen(n, create_using=create_using)
289 assert edges_equal(G.edges(), H.edges(), directed=G.is_directed())
290 assert edges_equal(H.edges(), G.edges(), directed=H.is_directed())
291
292 H.remove_edge(0, 1)
293 assert edges_equal(H.edges(), H.edges(), directed=H.is_directed())
294 assert not edges_equal(G.edges(), H.edges(), directed=G.is_directed())
295 assert not edges_equal(H.edges(), G.edges(), directed=H.is_directed())
296
297
298@pytest.mark.parametrize("n", [5, 10, 20])

Callers

nothing calls this directly

Calls 4

edges_equalFunction · 0.90
edgesMethod · 0.45
is_directedMethod · 0.45
remove_edgeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…