Skip to content

Commit

Permalink
xfail another dask/pyarrow test (#8636)
Browse files Browse the repository at this point in the history
* xfail another dask/pyarrow test

Unsure why this wasn't showing prior -- having tests fail in the good state does make it much more difficult to ensure everything is fixed before merging.
  • Loading branch information
max-sixty authored Jan 21, 2024
1 parent e4bdc39 commit 131c023
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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

0 comments on commit 131c023

Please sign in to comment.