You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2014/02/23 05:45:04 UTC

svn commit: r1570968 - /incubator/climate/trunk/ocw-ui/backend/tests/test_processing.py

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(