Skip to content
forked from pydata/xarray

Commit e7b8767

Browse files
committed
Fix/silence upstream tests
1. Fix numpy formatting test (Closes pydata#9873) 2. xfail cftimeindex test (pydata#9878) Closes pydata#9810
1 parent 96e0ff7 commit e7b8767

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

xarray/tests/test_cftimeindex.py

+1
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,7 @@ def test_to_datetimeindex_feb_29(calendar):
11881188
index.to_datetimeindex()
11891189

11901190

1191+
@pytest.mark.xfail(reason="fails on pandas main branch")
11911192
@requires_cftime
11921193
def test_multiindex():
11931194
index = xr.cftime_range("2001-01-01", periods=100, calendar="360_day")

xarray/tests/test_formatting.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1020,9 +1020,10 @@ def test_display_nbytes() -> None:
10201020
assert actual == expected
10211021

10221022
actual = repr(xds["foo"])
1023-
expected = """
1023+
array_repr = repr(xds.foo.data)
1024+
expected = f"""
10241025
<xarray.DataArray 'foo' (foo: 1200)> Size: 2kB
1025-
array([ 0, 1, 2, ..., 1197, 1198, 1199], dtype=int16)
1026+
{array_repr}
10261027
Coordinates:
10271028
* foo (foo) int16 2kB 0 1 2 3 4 5 6 ... 1194 1195 1196 1197 1198 1199
10281029
""".strip()

0 commit comments

Comments
 (0)