climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1570968 - /incubator/climate/trunk/ocw-ui/backend/tests/test_processing.py
Date Sun, 23 Feb 2014 04:45:04 GMT
Author: joyce
Date: Sun Feb 23 04:45:03 2014
New Revision: 1570968

URL: http://svn.apache.org/r1570968
Log:
CLIMATE-332 - Add grid shape calculation tests

Modified:
    incubator/climate/trunk/ocw-ui/backend/tests/test_processing.py

Modified: incubator/climate/trunk/ocw-ui/backend/tests/test_processing.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/tests/test_processing.py?rev=1570968&r1=1570967&r2=1570968&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/tests/test_processing.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/tests/test_processing.py Sun Feb 23 04:45:03 2014
@@ -116,6 +116,12 @@ class TestSpatialRebinHelpers(unittest.T
         self.assertTrue(numpy.array_equal(lats, new_lats))
         self.assertTrue(numpy.array_equal(lons, new_lons))
 
+class TestCalculateGridShape(unittest.TestCase):
+    def test_grid_shape_calculation(self):
+        ref_dataset = _create_fake_dataset('foo')
+        shape = bp._calculate_grid_shape(ref_dataset, max_cols=3)
+        self.assertEquals(shape, (3, 3))
+
 class TestFilePathCreation(unittest.TestCase):
     def setUp(self):
         self.full_evaluation = Evaluation(



Mime
View raw message