31
31
from rioxarray .rioxarray import _generate_spatial_coords , _make_coords
32
32
from test .conftest import (
33
33
GDAL_GE_361 ,
34
+ RASTERIO_GE_14 ,
34
35
TEST_COMPARE_DATA_DIR ,
35
36
TEST_INPUT_DATA_DIR ,
36
37
_assert_xarrays_equal ,
@@ -805,7 +806,7 @@ def test_reproject_match__non_geospatial(dummy_dataset_non_geospatial):
805
806
def test_reproject_match__geographic_dataset ():
806
807
lat = [0.1 , 0.15 , 0.2 ]
807
808
lon = [0.1 , 0.15 , 0.2 ]
808
- data = numpy .arange (1 , 10 ).reshape (3 , 3 )
809
+ data = numpy .arange (1 , 10 , dtype = numpy . float32 ).reshape (3 , 3 )
809
810
ds = xarray .Dataset (
810
811
data_vars = {
811
812
"foo" : (["lat" , "lon" ], data ),
@@ -2185,7 +2186,13 @@ def test_reproject_transform_missing_shape():
2185
2186
"dtype, expected_nodata" ,
2186
2187
[
2187
2188
(numpy .uint8 , 255 ),
2188
- (numpy .int8 , - 128 ),
2189
+ pytest .param (
2190
+ numpy .int8 ,
2191
+ - 128 ,
2192
+ marks = pytest .mark .xfail (
2193
+ not RASTERIO_GE_14 , reason = "Not worried about it if it works on latest."
2194
+ ),
2195
+ ),
2189
2196
(numpy .uint16 , 65535 ),
2190
2197
(numpy .int16 , - 32768 ),
2191
2198
(numpy .uint32 , 4294967295 ),
@@ -2194,8 +2201,20 @@ def test_reproject_transform_missing_shape():
2194
2201
(numpy .float64 , numpy .nan ),
2195
2202
(numpy .complex64 , numpy .nan ),
2196
2203
(numpy .complex128 , numpy .nan ),
2197
- (numpy .uint64 , 18446744073709551615 ),
2198
- (numpy .int64 , - 9223372036854775808 ),
2204
+ pytest .param (
2205
+ numpy .uint64 ,
2206
+ 18446744073709551615 ,
2207
+ marks = pytest .mark .xfail (
2208
+ not RASTERIO_GE_14 , reason = "Not worried about it if it works on latest."
2209
+ ),
2210
+ ),
2211
+ pytest .param (
2212
+ numpy .int64 ,
2213
+ - 9223372036854775808 ,
2214
+ marks = pytest .mark .xfail (
2215
+ not RASTERIO_GE_14 , reason = "Not worried about it if it works on latest."
2216
+ ),
2217
+ ),
2199
2218
],
2200
2219
)
2201
2220
def test_reproject_default_nodata (dtype , expected_nodata ):
0 commit comments