Пример #1
0
 def test_GIVEN_global_bounds_WHEN_given_latitude_less_than_minus_90_raise_InvalidSpatialExtent(self):
     with self.assertRaises(InvalidSpatialExtent, msg="Should have thrown an InvalidSpatialExtent exception"):
         spatial_extent = SpatialExtent(90, -90, -180, 180)
         spatial_extent.set_lat_n(45)
         spatial_extent.set_lat_s(-90.000001)
     with self.assertRaises(InvalidSpatialExtent, msg="Should have thrown an InvalidSpatialExtent exception"):
         spatial_extent = SpatialExtent(90, -90, -180, 180)
         spatial_extent.set_lat_n(5)
         spatial_extent.set_lat_s(-180)
Пример #2
0
 def test_GIVEN_limited_bounds_WHEN_given_northern_latitude_below_southern_latitude_THEN_raise_InvalidSpatialExtent(self):
     with self.assertRaises(InvalidSpatialExtent, msg="Should have thrown an InvalidSpatialExtent exception"):
         spatial_extent = SpatialExtent(45, -45, -50, 50)
         spatial_extent.set_lat_n(1)
         spatial_extent.set_lat_s(30)
Пример #3
0
 def test_GIVEN_limited_bounds_WHEN_given_latitudes_in_bounds_THEN_accepted(self):
         spatial_extent = SpatialExtent(45, -45, -50, 50)
         spatial_extent.set_lat_n(30)
         spatial_extent.set_lat_s(1)
Пример #4
0
 def test_GIVEN_global_bounds_WHEN_given_latitude_equal_to_bounds_THEN_accepted(self):
     spatial_extent = SpatialExtent(90, -90, -180, 180)
     spatial_extent.set_lat_n(90)
     spatial_extent.set_lat_s(-90)