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 another dask/pyarrow test #8636

Merged
merged 3 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion xarray/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,12 @@ def find_stack_level(test_mode=False) -> int:
pkg_dir = Path(xr.__file__).parent
test_dir = pkg_dir / "tests"

std_lib_dir = Path(sys.modules["os"].__file__).parent # Standard library path
std_lib_init = sys.modules["os"].__file__
# Mostly to appease mypy; I don't think this can happen...
if std_lib_init is None:
return 0

std_lib_dir = Path(std_lib_init).parent

frame = inspect.currentframe()
n = 0
Expand Down
4 changes: 4 additions & 0 deletions xarray/tests/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,10 @@ def test_to_dask_dataframe_coordinates(self):
assert isinstance(actual, dd.DataFrame)
assert_frame_equal(expected.compute(), actual.compute())

@pytest.mark.xfail(
reason="Currently pandas with pyarrow installed will return a `string[pyarrow]` type, "
"which causes the index to have a different type depending on whether pyarrow is installed"
)
def test_to_dask_dataframe_not_daskarray(self):
# Test if DataArray is not a dask array
x = np.random.randn(10)
Expand Down
Loading