Skip to content

Commit

Permalink
supress ambiguous reference date string warning (pydata#4590)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathause authored Nov 19, 2020
1 parent 6c32d7c commit 19c2626
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions xarray/tests/test_coding_times.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def _all_cftime_date_types():


@requires_cftime
@pytest.mark.filterwarnings("ignore:Ambiguous reference date string")
@pytest.mark.parametrize(["num_dates", "units", "calendar"], _CF_DATETIME_TESTS)
def test_cf_datetime(num_dates, units, calendar):
import cftime
Expand Down
1 change: 1 addition & 0 deletions xarray/tests/test_conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def test_decode_cf_with_drop_variables(self):
assert_identical(expected, actual)
assert_identical(expected, actual2)

@pytest.mark.filterwarnings("ignore:Ambiguous reference date string")
def test_invalid_time_units_raises_eagerly(self):
ds = Dataset({"time": ("time", [0, 1], {"units": "foobar since 123"})})
with raises_regex(ValueError, "unable to decode time"):
Expand Down

0 comments on commit 19c2626

Please sign in to comment.