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))
def test_missing_dim_coord(self): cube = self.cube[0] cube.remove_coord(cube.dim_coords[0]) self.assertFalse(ghrsstl4._is_valid_cube(cube))
def test_4d(self): cube = self.cube self.assertFalse(ghrsstl4._is_valid_cube(cube))
def test_1d(self): cube = self.cube[0, 0, 0] self.assertFalse(ghrsstl4._is_valid_cube(cube))
def test_ok(self): cube = self.cube[0] self.assertTrue(ghrsstl4._is_valid_cube(cube))
def test_transposed(self): cube = self.cube[0] cube.transpose() self.assertFalse(ghrsstl4._is_valid_cube(cube))
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))