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

test: xfail iter_rows tests for cudf #1209

Merged
merged 1 commit into from
Oct 17, 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
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
Loading