From a370a2da52632c50611abe74c9094bccea8546ef Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Tue, 18 Oct 2016 11:50:59 -0600 Subject: [PATCH] pep8 updates of test file --- src/py/crankshaft/test/test_cluster_kmeans.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/py/crankshaft/test/test_cluster_kmeans.py b/src/py/crankshaft/test/test_cluster_kmeans.py index aba8e07..f1b738a 100644 --- a/src/py/crankshaft/test/test_cluster_kmeans.py +++ b/src/py/crankshaft/test/test_cluster_kmeans.py @@ -14,25 +14,25 @@ import crankshaft.pysal_utils as pu from crankshaft import random_seeds import json + class KMeansTest(unittest.TestCase): """Testing class for Moran's I functions""" def setUp(self): plpy._reset() - self.cluster_data = json.loads(open(fixture_file('kmeans.json')).read()) + self.cluster_data = json.loads( + open(fixture_file('kmeans.json')).read()) self.params = {"subquery": "select * from table", - "no_clusters": "10" - } + "no_clusters": "10"} def test_kmeans(self): data = self.cluster_data - plpy._define_result('select' ,data) + plpy._define_result('select', data) clusters = cc.kmeans('subquery', 2) - labels = [a[1] for a in clusters] - c1 = [a for a in clusters if a[1]==0] - c2 = [a for a in clusters if a[1]==1] - - self.assertEqual(len(np.unique(labels)),2) - self.assertEqual(len(c1),20) - self.assertEqual(len(c2),20) + labels = [a[1] for a in clusters] + c1 = [a for a in clusters if a[1] == 0] + c2 = [a for a in clusters if a[1] == 1] + self.assertEqual(len(np.unique(labels)), 2) + self.assertEqual(len(c1), 20) + self.assertEqual(len(c2), 20)