Skip to content

Commit

Permalink
skip the pandas datetime roundtrip test with pandas=3.0 (#9104)
Browse files Browse the repository at this point in the history
* skip the roundtrip test with `pandas=3.0`

* mention the relevant issue in the skip reason
  • Loading branch information
keewis authored and andersy005 committed Jun 14, 2024
1 parent adc01be commit baee201
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions properties/test_pandas_roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pytest

import xarray as xr
from xarray.tests import has_pandas_3

pytest.importorskip("hypothesis")
import hypothesis.extra.numpy as npst # isort:skip
Expand Down Expand Up @@ -110,6 +111,10 @@ def test_roundtrip_pandas_dataframe(df) -> None:
xr.testing.assert_identical(arr, roundtripped.to_xarray())


@pytest.mark.skipif(
has_pandas_3,
reason="fails to roundtrip on pandas 3 (see https://github.com/pydata/xarray/issues/9098)",
)
@given(df=dataframe_strategy)
def test_roundtrip_pandas_dataframe_datetime(df) -> None:
# Need to name the indexes, otherwise Xarray names them 'dim_0', 'dim_1'.
Expand Down

0 comments on commit baee201

Please sign in to comment.