From 19c2626f4beb1678180489275b152f9bb1673721 Mon Sep 17 00:00:00 2001 From: Mathias Hauser Date: Thu, 19 Nov 2020 17:46:38 +0100 Subject: [PATCH] supress ambiguous reference date string warning (#4590) --- xarray/tests/test_coding_times.py | 1 + xarray/tests/test_conventions.py | 1 + 2 files changed, 2 insertions(+) diff --git a/xarray/tests/test_coding_times.py b/xarray/tests/test_coding_times.py index e3d68355ef3..d35cad019b7 100644 --- a/xarray/tests/test_coding_times.py +++ b/xarray/tests/test_coding_times.py @@ -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 diff --git a/xarray/tests/test_conventions.py b/xarray/tests/test_conventions.py index dcd9541dd79..9abaa978651 100644 --- a/xarray/tests/test_conventions.py +++ b/xarray/tests/test_conventions.py @@ -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"):