-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Potential bug in connected_double_edge_swap #6220
Copy link
Copy link
Closed
Labels
Description
The following test case failed during a pytest-randomly workflow:
networkx/networkx/algorithms/tests/test_swap.py
Lines 37 to 39 in 8959637
| def test_edge_cases_con_double_edge_swap(): | |
| graph = nx.path_graph(4) | |
| assert 0 == nx.connected_double_edge_swap(graph) |
I was able to reproduce locally on main by running interactively. When running without a seed, I occasionally get 1 instead of 0. This is also reproducible when seeded:
>>> G = nx.path_graph(4)
>>> nx.connected_double_edge_swap(G, seed=140)
1I tested with both 2.8.3 and 2.7 and was able to reproduce with those versions as well, so I don't think this is something recently introduced (though I haven't looked at blame or bisected).
Reactions are currently unavailable