Example #1
0
 def test_2d_missing_time_coord(self):
     cube = self.cube[0, 0]
     cube.remove_coord(cube.coord('time'))
     self.assertFalse(ghrsstl4._is_valid_cube(cube))
Example #2
0
 def test_missing_dim_coord(self):
     cube = self.cube[0]
     cube.remove_coord(cube.dim_coords[0])
     self.assertFalse(ghrsstl4._is_valid_cube(cube))
Example #3
0
 def test_4d(self):
     cube = self.cube
     self.assertFalse(ghrsstl4._is_valid_cube(cube))
Example #4
0
 def test_1d(self):
     cube = self.cube[0, 0, 0]
     self.assertFalse(ghrsstl4._is_valid_cube(cube))
Example #5
0
 def test_ok(self):
     cube = self.cube[0]
     self.assertTrue(ghrsstl4._is_valid_cube(cube))
Example #6
0
 def test_transposed(self):
     cube = self.cube[0]
     cube.transpose()
     self.assertFalse(ghrsstl4._is_valid_cube(cube))
Example #7
0
 def test_invalid_dim_coord(self):
     cube = self.cube[0]
     cube.dim_coords[2].rename('projection_x_coordinate')
     self.assertFalse(ghrsstl4._is_valid_cube(cube))