Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xfail tests due to #3751 #3808

Merged
merged 1 commit into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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