pep8 updates of test file
This commit is contained in:
parent
5404589058
commit
a370a2da52
@ -14,15 +14,16 @@ import crankshaft.pysal_utils as pu
|
|||||||
from crankshaft import random_seeds
|
from crankshaft import random_seeds
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
||||||
class KMeansTest(unittest.TestCase):
|
class KMeansTest(unittest.TestCase):
|
||||||
"""Testing class for Moran's I functions"""
|
"""Testing class for Moran's I functions"""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
plpy._reset()
|
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",
|
self.params = {"subquery": "select * from table",
|
||||||
"no_clusters": "10"
|
"no_clusters": "10"}
|
||||||
}
|
|
||||||
|
|
||||||
def test_kmeans(self):
|
def test_kmeans(self):
|
||||||
data = self.cluster_data
|
data = self.cluster_data
|
||||||
@ -35,4 +36,3 @@ class KMeansTest(unittest.TestCase):
|
|||||||
self.assertEqual(len(np.unique(labels)), 2)
|
self.assertEqual(len(np.unique(labels)), 2)
|
||||||
self.assertEqual(len(c1), 20)
|
self.assertEqual(len(c1), 20)
|
||||||
self.assertEqual(len(c2), 20)
|
self.assertEqual(len(c2), 20)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user