Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xfail pyarrow test #8635

Merged
merged 3 commits into from
Jan 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions xarray/tests/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,10 @@
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)
Expand All @@ -830,10 +834,6 @@
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)
Expand Down Expand Up @@ -879,7 +879,7 @@

actual = ds.to_dask_dataframe(set_index=True)
assert isinstance(actual, dd.DataFrame)
assert_frame_equal(expected, actual.compute())

Check failure on line 882 in xarray/tests/test_dask.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9

TestToDaskDataFrame.test_to_dask_dataframe_not_daskarray AssertionError: DataFrame.index are different Attribute "dtype" are different [left]: object [right]: string[pyarrow]

Check failure on line 882 in xarray/tests/test_dask.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 flaky

TestToDaskDataFrame.test_to_dask_dataframe_not_daskarray AssertionError: DataFrame.index are different Attribute "dtype" are different [left]: object [right]: string[pyarrow]

Check failure on line 882 in xarray/tests/test_dask.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.11

TestToDaskDataFrame.test_to_dask_dataframe_not_daskarray AssertionError: DataFrame.index are different Attribute "dtype" are different [left]: object [right]: string[pyarrow]

Check failure on line 882 in xarray/tests/test_dask.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.11

TestToDaskDataFrame.test_to_dask_dataframe_not_daskarray AssertionError: DataFrame.index are different Attribute "dtype" are different [left]: object [right]: string[pyarrow]

Check failure on line 882 in xarray/tests/test_dask.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.9

TestToDaskDataFrame.test_to_dask_dataframe_not_daskarray AssertionError: DataFrame.index are different Attribute "dtype" are different [left]: object [right]: string[pyarrow]

def test_to_dask_dataframe_no_coordinate(self):
x = da.from_array(np.random.randn(10), chunks=4)
Expand Down
Loading