diff options
-rw-r--r-- | networkx/generators/tests/test_expanders.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/networkx/generators/tests/test_expanders.py b/networkx/generators/tests/test_expanders.py index 58f6b1b8..f84b04a7 100644 --- a/networkx/generators/tests/test_expanders.py +++ b/networkx/generators/tests/test_expanders.py @@ -64,9 +64,24 @@ def test_paley_graph(p): assert (v, u) in G.edges -@pytest.mark.parametrize("graph_type", (nx.Graph, nx.DiGraph)) +@pytest.mark.parametrize("graph_type", (nx.Graph, nx.DiGraph, nx.MultiDiGraph)) def test_margulis_gabber_galil_graph_badinput(graph_type): with pytest.raises( nx.NetworkXError, match="`create_using` must be an undirected multigraph" ): nx.margulis_gabber_galil_graph(3, create_using=graph_type) + + +@pytest.mark.parametrize("graph_type", (nx.Graph, nx.DiGraph, nx.MultiDiGraph)) +def test_chordal_cycle_graph_badinput(graph_type): + with pytest.raises( + nx.NetworkXError, match="`create_using` must be an undirected multigraph" + ): + nx.chordal_cycle_graph(3, create_using=graph_type) + + +def test_paley_graph_badinput(): + with pytest.raises( + nx.NetworkXError, match="`create_using` cannot be a multigraph." + ): + nx.paley_graph(3, create_using=nx.MultiGraph) |