summaryrefslogtreecommitdiff
path: root/networkx/algorithms/flow/tests
diff options
context:
space:
mode:
authorDan Schult <dschult@colgate.edu>2017-08-02 10:26:48 -0400
committerGitHub <noreply@github.com>2017-08-02 10:26:48 -0400
commitca2df82141cf6977c9d59af2d0bfbc990e2aabce (patch)
treecc84dd20c06750959c8be349073cb907100b80a4 /networkx/algorithms/flow/tests
parent766aa7b1ef12f85d6af52c6a95c0c147463535ee (diff)
downloadnetworkx-ca2df82141cf6977c9d59af2d0bfbc990e2aabce.tar.gz
Some changes to reduce the really long parts of tests (#2561)
* adjust some of the slowest tests. minor speedup of is_connected. * Add adj property to AntiGraph class in kcomponents.py * Add comment to explain why test loop only goes once
Diffstat (limited to 'networkx/algorithms/flow/tests')
-rw-r--r--networkx/algorithms/flow/tests/test_maxflow_large_graph.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/networkx/algorithms/flow/tests/test_maxflow_large_graph.py b/networkx/algorithms/flow/tests/test_maxflow_large_graph.py
index 9872b27e..b8350a19 100644
--- a/networkx/algorithms/flow/tests/test_maxflow_large_graph.py
+++ b/networkx/algorithms/flow/tests/test_maxflow_large_graph.py
@@ -115,9 +115,13 @@ class TestMaxflowLargeGraph:
R = build_residual_network(G, 'capacity')
kwargs = dict(residual=R)
- for flow_func in flow_funcs:
- validate_flows(G, s, t, 156545, flow_func(G, s, t, **kwargs),
+ # do one flow_func to save time
+ flow_func = flow_funcs[0]
+ validate_flows(G, s, t, 156545, flow_func(G, s, t, **kwargs),
flow_func)
+# for flow_func in flow_funcs:
+# validate_flows(G, s, t, 156545, flow_func(G, s, t, **kwargs),
+# flow_func)
def test_gw1(self):
G = read_graph('gw1')
@@ -137,9 +141,13 @@ class TestMaxflowLargeGraph:
R = build_residual_network(G, 'capacity')
kwargs = dict(residual=R)
- for flow_func in flow_funcs:
- validate_flows(G, s, t, 11875108, flow_func(G, s, t, **kwargs),
+ # do one flow_func to save time
+ flow_func = flow_funcs[0]
+ validate_flows(G, s, t, 11875108, flow_func(G, s, t, **kwargs),
flow_func)
+# for flow_func in flow_funcs:
+# validate_flows(G, s, t, 11875108, flow_func(G, s, t, **kwargs),
+# flow_func)
def test_preflow_push_global_relabel(self):
G = read_graph('gw1')