(graph_type)
| 928 | "graph_type", [nx.Graph, nx.DiGraph, nx.MultiGraph, nx.MultiDiGraph] |
| 929 | ) |
| 930 | def test_selfloops(graph_type): |
| 931 | G = nx.complete_graph(3, create_using=graph_type) |
| 932 | G.add_edge(0, 0) |
| 933 | assert nodes_equal(nx.nodes_with_selfloops(G), [0]) |
| 934 | assert edges_equal(nx.selfloop_edges(G), [(0, 0)]) |
| 935 | assert edges_equal(nx.selfloop_edges(G, data=True), [(0, 0, {})]) |
| 936 | assert nx.number_of_selfloops(G) == 1 |
| 937 | |
| 938 | |
| 939 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…