def test_doesnt_use_mask_when_override_mask(): raster = Mock() raster.mask_flag_enums = ([MaskFlags.per_dataset], [MaskFlags.per_dataset]) assert not GeoRaster2._read_with_mask(raster, masked=False)
def test_doesnt_use_mask_when_no_mask(): raster = Mock() raster.mask_flag_enums = ([MaskFlags.nodata], [MaskFlags.per_dataset]) assert not GeoRaster2._read_with_mask(raster, masked=None)
def test_useses_mask_when_there_is_mask(): raster = Mock() raster.mask_flag_enums = ([MaskFlags.per_dataset], [MaskFlags.per_dataset]) assert GeoRaster2._read_with_mask(raster, masked=None)