Skip to content

Commit

Permalink
xfail tests due to #3751 (#3808)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerkclark committed Feb 28, 2020
1 parent b6c8162 commit fd08842
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 15 additions & 2 deletions xarray/tests/test_cftimeindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ def test_sel_date_scalar(da, date_type, index):
assert_identical(result, expected)


@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
@requires_cftime
@pytest.mark.parametrize(
"sel_kwargs",
Expand Down Expand Up @@ -501,14 +502,20 @@ def test_sel_date_scalar_backfill(da, date_type, index, sel_kwargs):
[
{"method": "pad", "tolerance": timedelta(days=20)},
{"method": "backfill", "tolerance": timedelta(days=20)},
{"method": "nearest", "tolerance": timedelta(days=20)},
pytest.param(
{"method": "nearest", "tolerance": timedelta(days=20)},
marks=pytest.mark.xfail(
reason="https://github.com/pydata/xarray/issues/3751"
),
),
],
)
def test_sel_date_scalar_tolerance_raises(da, date_type, sel_kwargs):
with pytest.raises(KeyError):
da.sel(time=date_type(1, 5, 1), **sel_kwargs)


@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
@requires_cftime
@pytest.mark.parametrize(
"sel_kwargs",
Expand Down Expand Up @@ -556,7 +563,12 @@ def test_sel_date_list_backfill(da, date_type, index, sel_kwargs):
[
{"method": "pad", "tolerance": timedelta(days=20)},
{"method": "backfill", "tolerance": timedelta(days=20)},
{"method": "nearest", "tolerance": timedelta(days=20)},
pytest.param(
{"method": "nearest", "tolerance": timedelta(days=20)},
marks=pytest.mark.xfail(
reason="https://github.com/pydata/xarray/issues/3751"
),
),
],
)
def test_sel_date_list_tolerance_raises(da, date_type, sel_kwargs):
Expand Down Expand Up @@ -591,6 +603,7 @@ def range_args(date_type):
]


@pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/3751")
@requires_cftime
def test_indexing_in_series_getitem(series, index, scalar_args, range_args):
for arg in scalar_args:
Expand Down
4 changes: 4 additions & 0 deletions xarray/tests/test_interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ def test_datetime_single_string():
assert_allclose(actual.drop_vars("time"), expected)


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


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


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


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

0 comments on commit fd08842

Please sign in to comment.