summaryrefslogtreecommitdiff
path: root/networkx/algorithms/approximation
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2019-10-17 20:51:46 -0700
committerJarrod Millman <jarrod.millman@gmail.com>2019-10-18 00:47:00 -0700
commitdc73628a6291e470d76d42e9efaa6e09599d8ce8 (patch)
treeaefc2262ea2fca44cc36d9537278da83f8a8ff68 /networkx/algorithms/approximation
parentd50eef197f1e7f452dee8b85c2cec3039124f43c (diff)
downloadnetworkx-dc73628a6291e470d76d42e9efaa6e09599d8ce8.tar.gz
PEP8 fixes to tests
Diffstat (limited to 'networkx/algorithms/approximation')
-rw-r--r--networkx/algorithms/approximation/tests/test_approx_clust_coeff.py8
-rw-r--r--networkx/algorithms/approximation/tests/test_connectivity.py8
-rw-r--r--networkx/algorithms/approximation/tests/test_kcomponents.py4
3 files changed, 10 insertions, 10 deletions
diff --git a/networkx/algorithms/approximation/tests/test_approx_clust_coeff.py b/networkx/algorithms/approximation/tests/test_approx_clust_coeff.py
index 8bb538dc..c1642c18 100644
--- a/networkx/algorithms/approximation/tests/test_approx_clust_coeff.py
+++ b/networkx/algorithms/approximation/tests/test_approx_clust_coeff.py
@@ -9,28 +9,28 @@ def test_petersen():
# Actual coefficient is 0
G = nx.petersen_graph()
assert (average_clustering(G, trials=int(len(G) / 2)) ==
- nx.average_clustering(G))
+ nx.average_clustering(G))
def test_petersen_seed():
# Actual coefficient is 0
G = nx.petersen_graph()
assert (average_clustering(G, trials=int(len(G) / 2), seed=1) ==
- nx.average_clustering(G))
+ nx.average_clustering(G))
def test_tetrahedral():
# Actual coefficient is 1
G = nx.tetrahedral_graph()
assert (average_clustering(G, trials=int(len(G) / 2)) ==
- nx.average_clustering(G))
+ nx.average_clustering(G))
def test_dodecahedral():
# Actual coefficient is 0
G = nx.dodecahedral_graph()
assert (average_clustering(G, trials=int(len(G) / 2)) ==
- nx.average_clustering(G))
+ nx.average_clustering(G))
def test_empty():
diff --git a/networkx/algorithms/approximation/tests/test_connectivity.py b/networkx/algorithms/approximation/tests/test_connectivity.py
index 42cd9a15..d9053541 100644
--- a/networkx/algorithms/approximation/tests/test_connectivity.py
+++ b/networkx/algorithms/approximation/tests/test_connectivity.py
@@ -104,8 +104,8 @@ def test_directed_node_connectivity():
D = nx.cycle_graph(10).to_directed() # 2 reciprocal edges
assert 1 == approx.node_connectivity(G)
assert 1 == approx.node_connectivity(G, 1, 4)
- assert 2 == approx.node_connectivity(D)
- assert 2 == approx.node_connectivity(D, 1, 4)
+ assert 2 == approx.node_connectivity(D)
+ assert 2 == approx.node_connectivity(D, 1, 4)
class TestAllPairsNodeConnectivityApprox:
@@ -122,8 +122,8 @@ class TestAllPairsNodeConnectivityApprox:
cls.K10 = nx.complete_graph(10)
cls.K5 = nx.complete_graph(5)
cls.G_list = [cls.path, cls.directed_path, cls.cycle,
- cls.directed_cycle, cls.gnp, cls.directed_gnp, cls.K10,
- cls.K5, cls.K20]
+ cls.directed_cycle, cls.gnp, cls.directed_gnp, cls.K10,
+ cls.K5, cls.K20]
def test_cycles(self):
K_undir = approx.all_pairs_node_connectivity(self.cycle)
diff --git a/networkx/algorithms/approximation/tests/test_kcomponents.py b/networkx/algorithms/approximation/tests/test_kcomponents.py
index 9a0c5161..c1c65416 100644
--- a/networkx/algorithms/approximation/tests/test_kcomponents.py
+++ b/networkx/algorithms/approximation/tests/test_kcomponents.py
@@ -259,6 +259,6 @@ class TestAntiGraph:
assert sum(d for n, d in G.degree()) == sum(d for n, d in A.degree())
# AntiGraph is a ThinGraph, so all the weights are 1
assert (sum(d for n, d in A.degree()) ==
- sum(d for n, d in A.degree(weight='weight')))
+ sum(d for n, d in A.degree(weight='weight')))
assert (sum(d for n, d in G.degree(nodes)) ==
- sum(d for n, d in A.degree(nodes)))
+ sum(d for n, d in A.degree(nodes)))