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 2013/08/16 16:42:40 UTC

svn commit: r1514737 - /incubator/climate/branches/RefactorInput/ocw/tests/test_dataset.py

Author: joyce
Date: Fri Aug 16 14:42:40 2013
New Revision: 1514737

URL: http://svn.apache.org/r1514737
Log:
CLIMATE-254 - Cleaning up tests

Modified:
    incubator/climate/branches/RefactorInput/ocw/tests/test_dataset.py

Modified: incubator/climate/branches/RefactorInput/ocw/tests/test_dataset.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/tests/test_dataset.py?rev=1514737&r1=1514736&r2=1514737&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/tests/test_dataset.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/tests/test_dataset.py Fri Aug 16 14:42:40 2013
@@ -83,6 +83,14 @@ class TestBounds(unittest.TestCase):
                             dt.datetime(2000, 1, 1), # Start time
                             dt.datetime(2002, 1, 1)) # End time
 
+    # Latitude tests
+    def test_inverted_min_max_lat(self):
+        with self.assertRaises(ValueError):
+            self.bounds.lat_min = 81
+
+        with self.assertRaises(ValueError):
+            self.bounds.lat_max = -81
+
     # Lat Min
     def test_out_of_bounds_lat_min(self):
         with self.assertRaises(ValueError):
@@ -91,10 +99,6 @@ class TestBounds(unittest.TestCase):
         with self.assertRaises(ValueError):
             self.bounds.lat_min = 91
 
-    def test_inverted_min_max_lat(self):
-        with self.assertRaises(ValueError):
-            self.bounds.lat_min = 81
-
     # Lat Max
     def test_out_of_bounds_lat_max(self):
         with self.assertRaises(ValueError):
@@ -103,9 +107,13 @@ class TestBounds(unittest.TestCase):
         with self.assertRaises(ValueError):
             self.bounds.lat_max = 91
 
-    def test_inverted_max_max_lat(self):
+    # Longitude tests
+    def test_inverted_max_max_lon(self):
         with self.assertRaises(ValueError):
-            self.bounds.lat_max = -81
+            self.bounds.lon_min = 161
+
+        with self.assertRaises(ValueError):
+            self.bounds.lon_max = -161
 
     # Lon Min
     def test_out_of_bounds_lon_min(self):
@@ -115,10 +123,6 @@ class TestBounds(unittest.TestCase):
         with self.assertRaises(ValueError):
             self.bounds.lon_min = 181
 
-    def test_inverted_max_max_lon(self):
-        with self.assertRaises(ValueError):
-            self.bounds.lon_min = 161
-
     # Lon Max
     def test_out_of_bounds_lon_max(self):
         with self.assertRaises(ValueError):
@@ -127,9 +131,5 @@ class TestBounds(unittest.TestCase):
         with self.assertRaises(ValueError):
             self.bounds.lon_max = 181
 
-    def test_inverted_max_max_lon(self):
-        with self.assertRaises(ValueError):
-            self.bounds.lon_max = -161
-
 if __name__ == '__main__':
     unittest.main()