Skip to content

Commit 1afba66

Browse files
authored
Allow test_indexes to pass on big-endian systems (#7026)
1 parent b018442 commit 1afba66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xarray/tests/test_indexes.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@ def test_join(self) -> None:
264264
actual = index1.join(index2)
265265
print(actual.index)
266266
assert actual.equals(expected)
267-
assert actual.coord_dtype == "<U4"
267+
assert actual.coord_dtype == "=U4"
268268

269269
expected = PandasIndex(["a", "aa", "aaa", "aaaa"], "x")
270270
actual = index1.join(index2, how="outer")
271271
print(actual.index)
272272
assert actual.equals(expected)
273-
assert actual.coord_dtype == "<U4"
273+
assert actual.coord_dtype == "=U4"
274274

275275
def test_reindex_like(self) -> None:
276276
index1 = PandasIndex([0, 1, 2], "x")
@@ -380,7 +380,7 @@ def test_concat(self) -> None:
380380
pd_midx = pd.MultiIndex.from_product(
381381
[[0, 1, 2], ["a", "b"]], names=("foo", "bar")
382382
)
383-
level_coords_dtype = {"foo": np.int32, "bar": "<U1"}
383+
level_coords_dtype = {"foo": np.int32, "bar": "=U1"}
384384

385385
midx1 = PandasMultiIndex(
386386
pd_midx[:2], "x", level_coords_dtype=level_coords_dtype
@@ -484,7 +484,7 @@ def test_sel(self) -> None:
484484

485485
def test_join(self):
486486
midx = pd.MultiIndex.from_product([["a", "aa"], [1, 2]], names=("one", "two"))
487-
level_coords_dtype = {"one": "<U2", "two": "i"}
487+
level_coords_dtype = {"one": "=U2", "two": "i"}
488488
index1 = PandasMultiIndex(midx, "x", level_coords_dtype=level_coords_dtype)
489489
index2 = PandasMultiIndex(midx[0:2], "x", level_coords_dtype=level_coords_dtype)
490490

0 commit comments

Comments
 (0)