Skip to content

Commit

Permalink
add test case for #1542
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Boothby committed May 22, 2015
1 parent ee4a431 commit 516879f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions networkx/algorithms/flow/tests/test_maxflow.py
Expand Up @@ -434,6 +434,14 @@ def test_preflow_push_global_relabel_freq():
assert_raises(nx.NetworkXError, preflow_push, G, 1, 2,
global_relabel_freq=-1)

def test_preflow_push_makes_enough_space():
#From ticket #1542
G = nx.DiGraph()
G.add_path([0,1,3],capacity=1)
G.add_path([1,2,3],capacity=1)
R = preflow_push(G,0,3,value_only=False)
assert_equal(R.graph['flow_value'], 1)

def test_shortest_augmenting_path_two_phase():
k = 5
p = 1000
Expand Down

0 comments on commit 516879f

Please sign in to comment.