Skip to content

Commit

Permalink
test: xfail iter_rows tests for cudf
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Oct 17, 2024
1 parent 55e00bb commit 453918b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/frame/rows_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ def test_rows_eager(
assert result == expected


def test_rows_with_nulls_unnamed(constructor_eager: ConstructorEager) -> None:
# GIVEN
def test_rows_with_nulls_unnamed(
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
) -> None:
if "cudf" in str(constructor_eager):
# cudf intentionally doesn't support itertuples / iter_rows
request.applymarker(pytest.mark.xfail)
df = nw.from_native(constructor_eager(data_na), eager_only=True)

# WHEN
result = list(df.iter_rows(named=False))

# THEN
expected = [(None, 4, 7.0), (3, 4, None), (2, 6, 9.0)]
for i, row in enumerate(expected):
for j, value in enumerate(row):
Expand All @@ -118,14 +118,14 @@ def test_rows_with_nulls_unnamed(constructor_eager: ConstructorEager) -> None:
assert value_in_result == value


def test_rows_with_nulls_named(constructor_eager: ConstructorEager) -> None:
# GIVEN
def test_rows_with_nulls_named(
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
) -> None:
if "cudf" in str(constructor_eager):
# cudf intentionally doesn't support itertuples / iter_rows
request.applymarker(pytest.mark.xfail)
df = nw.from_native(constructor_eager(data_na), eager_only=True)

# WHEN
result = list(df.iter_rows(named=True))

# THEN
expected: list[dict[str, Any]] = [
{"a": None, "b": 4, "z": 7.0},
{"a": 3, "b": 4, "z": None},
Expand Down

0 comments on commit 453918b

Please sign in to comment.