From 14c8379d86d5c6eb63a7e57bc6a226fefb8a15b0 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Apr 2024 09:03:21 -0600 Subject: [PATCH] one more cleanup --- xarray/tests/test_variable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xarray/tests/test_variable.py b/xarray/tests/test_variable.py index c7d0fbb886a..3167de2e2f0 100644 --- a/xarray/tests/test_variable.py +++ b/xarray/tests/test_variable.py @@ -3010,7 +3010,7 @@ def test_pandas_two_only_datetime_conversion_warnings() -> None: @pytest.mark.parametrize( - ("values", "warns_under_pandas_version_two"), + ("values", "warns"), [ (np.timedelta64(10, "ns"), False), (np.timedelta64(10, "s"), True), @@ -3022,9 +3022,9 @@ def test_pandas_two_only_datetime_conversion_warnings() -> None: ], ids=lambda x: f"{x}", ) -def test_timedelta_conversion_warning(values, warns_under_pandas_version_two) -> None: +def test_timedelta_conversion_warning(values, warns) -> None: dims = ["time"] if isinstance(values, (np.ndarray, pd.Index)) else [] - if warns_under_pandas_version_two: + if warns: with pytest.warns(UserWarning, match="non-nanosecond precision timedelta"): var = Variable(dims, values) else: