Skip to content

Commit bee5d72

Browse files
test: unxfail pandas[pyarrow] series slice on nightly (#2954)
Co-authored-by: FBruzzesi <[email protected]>
1 parent bb740d2 commit bee5d72

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

tests/expr_and_series/list/unique_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
def test_unique_expr(request: pytest.FixtureRequest, constructor: Constructor) -> None:
1717
if any(
1818
backend in str(constructor)
19-
for backend in ("dask", "modin", "cudf", "pyarrow", "pandas", "sqlframe")
19+
for backend in ("dask", "modin", "cudf", "pyarrow", "pandas")
2020
):
2121
# sqlframe issue: https://github.com/eakmanrq/sqlframe/issues/460
2222
request.applymarker(pytest.mark.xfail)

tests/frame/getitem_test.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
import narwhals as nw
11-
from tests.utils import ConstructorEager, assert_equal_data
11+
from tests.utils import PANDAS_VERSION, ConstructorEager, assert_equal_data
1212

1313
if TYPE_CHECKING:
1414
from narwhals.typing import _1DArray
@@ -301,9 +301,12 @@ def test_triple_tuple(constructor_eager: ConstructorEager) -> None:
301301
def test_slice_with_series(
302302
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
303303
) -> None:
304-
if "pandas_pyarrow" in str(constructor_eager):
305-
# https://github.com/pandas-dev/pandas/issues/61311
306-
request.applymarker(pytest.mark.xfail)
304+
request.applymarker(
305+
pytest.mark.xfail(
306+
"pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (3,),
307+
reason="https://github.com/pandas-dev/pandas/issues/61311",
308+
)
309+
)
307310
data = {"a": [1, 2, 3], "c": [0, 2, 1]}
308311
nw_df = nw.from_native(constructor_eager(data), eager_only=True)
309312
result = nw_df[nw_df["c"]]
@@ -325,9 +328,12 @@ def test_horizontal_slice_with_series(constructor_eager: ConstructorEager) -> No
325328
def test_horizontal_slice_with_series_2(
326329
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
327330
) -> None:
328-
if "pandas_pyarrow" in str(constructor_eager):
329-
# https://github.com/pandas-dev/pandas/issues/61311
330-
request.applymarker(pytest.mark.xfail)
331+
request.applymarker(
332+
pytest.mark.xfail(
333+
"pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (3,),
334+
reason="https://github.com/pandas-dev/pandas/issues/61311",
335+
)
336+
)
331337
data = {"a": [1, 2], "c": [0, 2], "d": ["c", "a"]}
332338
nw_df = nw.from_native(constructor_eager(data), eager_only=True)
333339
result = nw_df[:, nw_df["c"]]

0 commit comments

Comments
 (0)