- Update the nosetests to test times array

Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/d3fe34ec
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/d3fe34ec
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/d3fe34ec

Branch: refs/heads/master
Commit: d3fe34ece9ae84334e4e83c0f9c02262f8ddf987
Parents: da7c200
Author: Kim Whitehall <[email protected]>
Authored: Sun Mar 22 10:23:48 2015 -0700
Committer: Kim Whitehall <[email protected]>
Committed: Thu Mar 26 01:35:43 2015 -0700

----------------------------------------------------------------------
 ocw/tests/test_utils.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/d3fe34ec/ocw/tests/test_utils.py
----------------------------------------------------------------------
diff --git a/ocw/tests/test_utils.py b/ocw/tests/test_utils.py
index da5ad42..a5c8db6 100644
--- a/ocw/tests/test_utils.py
+++ b/ocw/tests/test_utils.py
@@ -213,8 +213,10 @@ class TestCalcClimatologyMonthly(unittest.TestCase):
 
     def test_calc_climatology_monthly(self):
         expected_result = np.ones(300).reshape(12, 5, 5)
-        actual_result = utils.calc_climatology_monthly(self.dataset)
+        expected_times = np.array([datetime.datetime(1, 1, 1) + 
relativedelta(months = x) for x in range(12)])
+        actual_result, actual_times = 
utils.calc_climatology_monthly(self.dataset)
         np.testing.assert_array_equal(actual_result, expected_result)
+        np.testing.assert_array_equal(actual_times, expected_times)
 
 
 if __name__ == '__main__':

Reply via email to