Bug#1019758: python-xarray: new autopkgtest regression on s390x

2022-09-14 Thread Graham Inggs
Control: tags -1 + patch

Please consider applying the attached patch.
Description: Allow test_indexes to pass on big-endian systems
Forwarded: https://github.com/pydata/xarray/pull/7026
Bug-Debian: https://bugs.debian.org/1019758
Author: Graham Inggs 
Last-Update: 2022-09-11

--- a/xarray/tests/test_indexes.py
+++ b/xarray/tests/test_indexes.py
@@ -264,13 +264,13 @@
 actual = index1.join(index2)
 print(actual.index)
 assert actual.equals(expected)
-assert actual.coord_dtype == " None:
 index1 = PandasIndex([0, 1, 2], "x")
@@ -380,7 +380,7 @@
 pd_midx = pd.MultiIndex.from_product(
 [[0, 1, 2], ["a", "b"]], names=("foo", "bar")
 )
-level_coords_dtype = {"foo": np.int32, "bar": "

Bug#1019758: python-xarray: new autopkgtest regression on s390x

2022-09-14 Thread Graham Inggs
Source: python-xarray
Version:  2022.06.0-1
Severity: serious
Forwarded: https://github.com/pydata/xarray/pull/7026
User: debian...@lists.debian.org
Usertags: regression

Hi Maintainer

Since the upload of python-xarray 2022.06.0-1, some new failing tests
appeared on the big-endian s390x architecture [1].  I've copied what I
hope is the relevant part of the log below.

Regards
Graham


[1] https://ci.debian.net/packages/p/python-xarray/testing/s390x/


=== FAILURES ===
__ TestPandasIndex.test_join ___

self = 

def test_join(self) -> None:
index1 = PandasIndex(["a", "aa", "aaa"], "x", coord_dtype="   assert actual.coord_dtype == "U4') == 'U4') = .coord_dtype

/usr/lib/python3/dist-packages/xarray/tests/test_indexes.py:267: AssertionError
- Captured stdout call -
Index(['aa', 'aaa'], dtype='object', name='x')
___ TestPandasMultiIndex.test_concat ___

self = 

def test_concat(self) -> None:
pd_midx = pd.MultiIndex.from_product(
[[0, 1, 2], ["a", "b"]], names=("foo", "bar")
)
level_coords_dtype = {"foo": np.int32, "bar": "   assert actual.level_coords_dtype == expected.level_coords_dtype
E   AssertionError: assert {'bar': dtype...type('int32')} ==
{'bar': '}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'bar': dtype('>U1')} != {'bar': '}
E + {'bar': dtype('>U1'), 'foo': dtype('int32')}

/usr/lib/python3/dist-packages/xarray/tests/test_indexes.py:395: AssertionError
 TestPandasMultiIndex.test_join 

self = 

def test_join(self):
midx = pd.MultiIndex.from_product([["a", "aa"], [1, 2]],
names=("one", "two"))
level_coords_dtype = {"one": "   assert actual.level_coords_dtype == level_coords_dtype
E   AssertionError: assert {'one': dtype...type('int32')} ==
{'one': 'U2')} != {'one': 'U2'), 'two': dtype('int32')}

/usr/lib/python3/dist-packages/xarray/tests/test_indexes.py:493: AssertionError