Skip to content

Commit

Permalink
Merge ecfc4ea into 067b778
Browse files Browse the repository at this point in the history
  • Loading branch information
dschult committed Jul 22, 2013
2 parents 067b778 + ecfc4ea commit 8ec460c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion networkx/algorithms/connectivity/tests/test_cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def _generate_no_biconnected(max_attempts=50):
yield G
else:
if attempts >= max_attempts:
msg = "Tried %d times: no suitable Graph."
msg = "Tried %d times: no suitable Graph."%attempts
raise Exception(msg % max_attempts)
else:
attempts += 1
Expand Down Expand Up @@ -138,6 +138,10 @@ def test_node_cutset_random_graphs():
def test_edge_cutset_random_graphs():
for i in range(5):
G = nx.fast_gnp_random_graph(50,0.2)
if not nx.is_connected(G):
ccs = iter(nx.connected_components(G))
start = next(ccs)[0]
G.add_edges_from( (start,c[0]) for c in ccs )
cutset = nx.minimum_edge_cut(G)
assert_equal(nx.edge_connectivity(G), len(cutset))
G.remove_edges_from(cutset)
Expand Down

0 comments on commit 8ec460c

Please sign in to comment.