Skip to content

Commit fd08842

Browse files
xfail tests due to #3751 (#3808)
1 parent b6c8162 commit fd08842

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

xarray/tests/test_cftimeindex.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ def test_sel_date_scalar(da, date_type, index):
450450
assert_identical(result, expected)
451451

452452

453+
@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
453454
@requires_cftime
454455
@pytest.mark.parametrize(
455456
"sel_kwargs",
@@ -501,14 +502,20 @@ def test_sel_date_scalar_backfill(da, date_type, index, sel_kwargs):
501502
[
502503
{"method": "pad", "tolerance": timedelta(days=20)},
503504
{"method": "backfill", "tolerance": timedelta(days=20)},
504-
{"method": "nearest", "tolerance": timedelta(days=20)},
505+
pytest.param(
506+
{"method": "nearest", "tolerance": timedelta(days=20)},
507+
marks=pytest.mark.xfail(
508+
reason="https://github.com/pydata/xarray/issues/3751"
509+
),
510+
),
505511
],
506512
)
507513
def test_sel_date_scalar_tolerance_raises(da, date_type, sel_kwargs):
508514
with pytest.raises(KeyError):
509515
da.sel(time=date_type(1, 5, 1), **sel_kwargs)
510516

511517

518+
@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
512519
@requires_cftime
513520
@pytest.mark.parametrize(
514521
"sel_kwargs",
@@ -556,7 +563,12 @@ def test_sel_date_list_backfill(da, date_type, index, sel_kwargs):
556563
[
557564
{"method": "pad", "tolerance": timedelta(days=20)},
558565
{"method": "backfill", "tolerance": timedelta(days=20)},
559-
{"method": "nearest", "tolerance": timedelta(days=20)},
566+
pytest.param(
567+
{"method": "nearest", "tolerance": timedelta(days=20)},
568+
marks=pytest.mark.xfail(
569+
reason="https://github.com/pydata/xarray/issues/3751"
570+
),
571+
),
560572
],
561573
)
562574
def test_sel_date_list_tolerance_raises(da, date_type, sel_kwargs):
@@ -591,6 +603,7 @@ def range_args(date_type):
591603
]
592604

593605

606+
@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
594607
@requires_cftime
595608
def test_indexing_in_series_getitem(series, index, scalar_args, range_args):
596609
for arg in scalar_args:

xarray/tests/test_interp.py

+4
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ def test_datetime_single_string():
556556
assert_allclose(actual.drop_vars("time"), expected)
557557

558558

559+
@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
559560
@requires_cftime
560561
@requires_scipy
561562
def test_cftime():
@@ -582,6 +583,7 @@ def test_cftime_type_error():
582583
da.interp(time=times_new)
583584

584585

586+
@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
585587
@requires_cftime
586588
@requires_scipy
587589
def test_cftime_list_of_strings():
@@ -603,6 +605,7 @@ def test_cftime_list_of_strings():
603605
assert_allclose(actual, expected)
604606

605607

608+
@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
606609
@requires_cftime
607610
@requires_scipy
608611
def test_cftime_single_string():
@@ -664,6 +667,7 @@ def test_datetime_interp_noerror():
664667
a.interp(x=xi, time=xi.time) # should not raise an error
665668

666669

670+
@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
667671
@requires_cftime
668672
def test_3641():
669673
times = xr.cftime_range("0001", periods=3, freq="500Y")

0 commit comments

Comments
 (0)