def test_notcube_error(self): with pytest.raises(TypeError): plan.OpeningAnglePlanform(self.golfcube['eta'][-1, :, :].data)
def test_defaults_array_float_error(self): with pytest.raises(TypeError): _ = plan.OpeningAnglePlanform(self.simple_ocean.astype(float))
def test_defaults_cube(self): _ = plan.OpeningAnglePlanform(self.golfcube, t=-1)
def test_defaults_array_bool(self): oap = plan.OpeningAnglePlanform(self.simple_ocean.astype(bool)) assert isinstance(oap.sea_angles, xr.core.dataarray.DataArray) assert oap.sea_angles.shape == self.simple_ocean.shape assert oap.below_mask.dtype == bool