diff --git a/fix_test_resample_loffset.patch b/fix_test_resample_loffset.patch new file mode 100644 index 0000000..46d630b --- /dev/null +++ b/fix_test_resample_loffset.patch @@ -0,0 +1,11 @@ +--- xarray-0.18.1/xarray/tests/test_dataset.py 2021-05-19 15:51:40.453553119 +0200 ++++ xarray-0.18.1/xarray/tests/test_dataset.py 2021-05-19 15:52:03.669706686 +0200 +@@ -3988,7 +3988,7 @@ + expected_ = ds.bar.to_series().resample("24H").mean() + expected_.index += to_offset("-12H") + expected = DataArray.from_series(expected_) +- assert_identical(actual, expected) ++ assert_allclose(actual, expected) + + def test_resample_by_mean_discarding_attrs(self): + times = pd.date_range("2000-01-01", freq="6H", periods=10) diff --git a/python-xarray.changes b/python-xarray.changes index bd44c91..b169007 100644 --- a/python-xarray.changes +++ b/python-xarray.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 19 13:53:54 UTC 2021 - Sebastian Wagner + +- add fix_test_resample_loffset.patch to fix test fail on i586 + https://github.com/pydata/xarray/issues/5341 + ------------------------------------------------------------------- Wed May 19 07:26:03 UTC 2021 - Sebastian Wagner diff --git a/python-xarray.spec b/python-xarray.spec index c3975d0..c290590 100644 --- a/python-xarray.spec +++ b/python-xarray.spec @@ -27,6 +27,8 @@ Summary: N-D labeled arrays and datasets in Python License: Apache-2.0 URL: https://github.com/pydata/xarray Source: https://files.pythonhosted.org/packages/source/x/xarray/xarray-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix_test_resample_loffset -- https://github.com/pydata/xarray/issues/5341 +Patch0: fix_test_resample_loffset.patch BuildRequires: %{python_module numpy >= 1.15} BuildRequires: %{python_module numpy-devel >= 1.14} BuildRequires: %{python_module pandas >= 0.25} @@ -80,6 +82,7 @@ The dataset is an in-memory representation of a netCDF file. %prep %autosetup -p1 -n xarray-%{version} +%patch0 -p1 chmod -x xarray/util/print_versions.py %build