Skip to content

Commit

Permalink
Improve test coverage for bipartite extendability (networkx#7306)
Browse files Browse the repository at this point in the history
* Improve testcov for bipextendability

* change function name

* changing fnx name
  • Loading branch information
vanshika230 authored and cvanelteren committed Apr 22, 2024
1 parent 5502f81 commit 620d90b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions networkx/algorithms/bipartite/tests/test_extendability.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ def test_no_perfect_matching_raises():
nx.bipartite.maximal_extendability(G)


def test_residual_graph_not_strongly_connected_raises():
G = nx.Graph([(1, 2), (2, 3), (3, 4)])
with pytest.raises(
nx.NetworkXError, match="The residual graph of G is not strongly connected"
):
nx.bipartite.maximal_extendability(G)


def test_ladder_graph_is_1():
G = nx.ladder_graph(3)
assert nx.bipartite.maximal_extendability(G) == 1
Expand Down

0 comments on commit 620d90b

Please sign in to comment.