From 623613aa5cd08cb9ddefbcadfb5adf6cd49389d7 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Mon, 29 Aug 2016 16:46:49 -0400 Subject: [PATCH] adding ordered dict to tests --- src/py/crankshaft/test/test_pysal_utils.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/py/crankshaft/test/test_pysal_utils.py b/src/py/crankshaft/test/test_pysal_utils.py index 171fdbc..393adf6 100644 --- a/src/py/crankshaft/test/test_pysal_utils.py +++ b/src/py/crankshaft/test/test_pysal_utils.py @@ -2,18 +2,19 @@ import unittest import crankshaft.pysal_utils as pu from crankshaft import random_seeds +from collections import OrderedDict class PysalUtilsTest(unittest.TestCase): """Testing class for utility functions related to PySAL integrations""" def setUp(self): - self.params = {"id_col": "cartodb_id", - "attr1": "andy", - "attr2": "jay_z", - "subquery": "SELECT * FROM a_list", - "geom_col": "the_geom", - "num_ngbrs": 321} + self.params = OrderedDict([("id_col", "cartodb_id"), + ("attr1": "andy"), + ("attr2": "jay_z"), + ("subquery": "SELECT * FROM a_list"), + ("geom_col": "the_geom"), + ("num_ngbrs": 321)]) self.params_array = {"id_col": "cartodb_id", "time_cols": ["_2013_dec", "_2014_jan", "_2014_feb"], @@ -69,7 +70,7 @@ class PysalUtilsTest(unittest.TestCase): "i.\"jay_z\" IS NOT NULL AND " \ "i.\"jay_z\" <> 0 " \ "ORDER BY i.\"cartodb_id\" ASC;" - + ans_array = "SELECT i.\"cartodb_id\" As id, " \ "i.\"_2013_dec\"::numeric As attr1, " \ "i.\"_2014_jan\"::numeric As attr2, " \