From 34bf4548b12b3e830522b65967fe34141ca4d8d4 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: May 22 2020 13:53:14 +0000 Subject: Add rasterio_tests.patch --- diff --git a/python-rasterio.spec b/python-rasterio.spec index 97f65a7..8134d4e 100644 --- a/python-rasterio.spec +++ b/python-rasterio.spec @@ -11,6 +11,8 @@ URL: https://github.com/mapbox/rasterio Source0: https://github.com/mapbox/rasterio/archive/%{version}/%{srcname}-%{version}.tar.gz # https://github.com/mapbox/rasterio/pull/1923 Patch0001: 0001-Mark-test_rio_env_no_credentials-as-needing-network.patch +# Adapt tests for GDAL-3.1.0 +Patch0002: rasterio_tests.patch BuildRequires: gcc-c++ BuildRequires: gdal >= 1.11 @@ -72,8 +74,10 @@ rm -r %{srcname} # Don't try unbuilt copy. # Skip tests on s390x, GEOS is broken on that arch and results in test failures %ifnarch s390x # test_outer_boundless_pixel_fidelity is very flaky, so skip it. +# Skip debian tests since we are not on debian PYTHONPATH="%{buildroot}%{python3_sitearch}" \ - pytest-3 -v -m 'not network and not wheel' -k 'not test_outer_boundless_pixel_fidelity' + pytest-3 -v -m 'not network and not wheel' \ + -k 'not test_outer_boundless_pixel_fidelity and not debian' %endif diff --git a/rasterio_tests.patch b/rasterio_tests.patch new file mode 100644 index 0000000..0971dac --- /dev/null +++ b/rasterio_tests.patch @@ -0,0 +1,21 @@ +diff -rupN rasterio-1.1.4/tests/test_warp.py rasterio-1.1.4-new/tests/test_warp.py +--- rasterio-1.1.4/tests/test_warp.py 2020-05-07 14:57:49.000000000 +0200 ++++ rasterio-1.1.4-new/tests/test_warp.py 2020-05-22 15:49:57.379564150 +0200 +@@ -1067,7 +1067,7 @@ def test_reproject_resampling(path_rgb_b + Resampling.cubic: 437888, + Resampling.cubic_spline: 440475, + Resampling.lanczos: 436001, +- Resampling.average: 439419, ++ Resampling.average: 439172, + Resampling.mode: 437298, + Resampling.max: 439464, + Resampling.min: 436397, +@@ -1104,7 +1104,7 @@ def test_reproject_resampling_alpha(meth + Resampling.cubic: 437888, + Resampling.cubic_spline: 440475, + Resampling.lanczos: 436001, +- Resampling.average: 439419, ++ Resampling.average: 439172, + Resampling.mode: 437298, + Resampling.max: 439464, + Resampling.min: 436397,