From f4ed09d30dc4317c9177f723568b2a32c2a1702f Mon Sep 17 00:00:00 2001 From: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Date: Sun, 21 Jan 2024 13:03:33 -0800 Subject: [PATCH] xfail pyarrow test (#8635) * xfail pyarrow test Sorry for the repeated PR -- some tests passed but some failed without pyarrow installed. So this xfails the test for the moment --- xarray/tests/test_dask.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xarray/tests/test_dask.py b/xarray/tests/test_dask.py index 4412f95796d..7d80ad01b17 100644 --- a/xarray/tests/test_dask.py +++ b/xarray/tests/test_dask.py @@ -812,6 +812,10 @@ def test_to_dask_dataframe(self): assert isinstance(actual, dd.DataFrame) assert_frame_equal(actual.compute(), expected.compute()) + @pytest.mark.xfail( + reason="Currently pandas with pyarrow installed will return a `string[pyarrow]` type, " + "which causes the `y` column to have a different type depending on whether pyarrow is installed" + ) def test_to_dask_dataframe_2D(self): # Test if 2-D dataset is supplied w = np.random.randn(2, 3) @@ -830,10 +834,6 @@ def test_to_dask_dataframe_2D(self): actual = ds.to_dask_dataframe(set_index=False) assert isinstance(actual, dd.DataFrame) - # TOOD: not sure if this is the correct behavior, but currently pandas with - # pyarrow installed will return a `string[pyarrow]` type, so matching that until - # we can fix the underlying issue - expected["y"] = expected["y"].astype("string[pyarrow]") assert_frame_equal(actual.compute(), expected) @pytest.mark.xfail(raises=NotImplementedError)