Skip to content

Commit

Permalink
Improving test coverage for Mycielsky.py (#7271)
Browse files Browse the repository at this point in the history
* Improving Mycielski_TestCov

* fix ruff error
  • Loading branch information
vanshika230 committed Feb 6, 2024
1 parent 923e029 commit 31ef963
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions networkx/generators/tests/test_mycielski.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Unit tests for the :mod:`networkx.generators.mycielski` module."""

import pytest

import networkx as nx


Expand All @@ -24,3 +26,5 @@ def test_mycielski_graph_generator(self):
assert nx.is_isomorphic(G, nx.cycle_graph(5))
G = nx.mycielski_graph(4)
assert nx.is_isomorphic(G, nx.mycielskian(nx.cycle_graph(5)))
with pytest.raises(nx.NetworkXError, match="must satisfy n >= 1"):
nx.mycielski_graph(0)

0 comments on commit 31ef963

Please sign in to comment.