Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into xfail-ewm-with-null…
Browse files Browse the repository at this point in the history
…s-cudf
  • Loading branch information
raisadz committed Nov 26, 2024
2 parents 7e71132 + 73e67c7 commit ad20205
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ exclude_also = [
"if (:?self._)?implementation is Implementation.MODIN",
"if (:?self._)?implementation is Implementation.CUDF",
'request.applymarker\(pytest.mark.xfail\)',
'if self._backend_version < '
'if self._backend_version < ',
'if "cudf" in str\(constructor',
]

[tool.mypy]
Expand Down
8 changes: 4 additions & 4 deletions tests/expr_and_series/str/to_datetime_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


def test_to_datetime(constructor: Constructor) -> None:
if "cudf" in str(constructor): # pragma: no cover
if "cudf" in str(constructor):
expected = "2020-01-01T12:34:56.000000000"
else:
expected = "2020-01-01 12:34:56"
Expand All @@ -34,7 +34,7 @@ def test_to_datetime(constructor: Constructor) -> None:


def test_to_datetime_series(constructor_eager: ConstructorEager) -> None:
if "cudf" in str(constructor_eager): # pragma: no cover
if "cudf" in str(constructor_eager):
expected = "2020-01-01T12:34:56.000000000"
else:
expected = "2020-01-01 12:34:56"
Expand Down Expand Up @@ -76,7 +76,7 @@ def test_to_datetime_infer_fmt(
) -> None:
if "polars" in str(constructor) and str(data["a"][0]).isdigit():
request.applymarker(pytest.mark.xfail)
if "cudf" in str(constructor): # pragma: no cover
if "cudf" in str(constructor):
expected = expected_cudf
result = (
nw.from_native(constructor(data))
Expand Down Expand Up @@ -117,7 +117,7 @@ def test_to_datetime_series_infer_fmt(
) -> None:
if "polars" in str(constructor_eager) and str(data["a"][0]).isdigit():
request.applymarker(pytest.mark.xfail)
if "cudf" in str(constructor_eager): # pragma: no cover
if "cudf" in str(constructor_eager):
expected = expected_cudf

result = (
Expand Down
11 changes: 8 additions & 3 deletions tests/frame/pivot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_pivot(
index: str | list[str],
request: pytest.FixtureRequest,
) -> None:
if any(x in str(constructor_eager) for x in ("pyarrow_table", "modin")):
if any(x in str(constructor_eager) for x in ("pyarrow_table", "modin", "cudf")):
request.applymarker(pytest.mark.xfail)
if ("polars" in str(constructor_eager) and POLARS_VERSION < (1, 0)) or (
"pandas" in str(constructor_eager) and PANDAS_VERSION < (1, 1)
Expand Down Expand Up @@ -153,6 +153,11 @@ def test_pivot_no_agg(
) -> None:
if any(x in str(constructor_eager) for x in ("pyarrow_table", "modin")):
request.applymarker(pytest.mark.xfail)
if "cudf" in str(constructor_eager):
# The first one fails, the second one passes. Let's just skip
# the test until they address their pivot shortcomings in the next
# release https://github.com/rapidsai/cudf/pull/17373.
return
if ("polars" in str(constructor_eager) and POLARS_VERSION < (1, 0)) or (
"pandas" in str(constructor_eager) and PANDAS_VERSION < (1, 1)
):
Expand All @@ -174,7 +179,7 @@ def test_pivot_no_agg(
def test_pivot_sort_columns(
request: Any, constructor_eager: Any, sort_columns: Any, expected: list[str]
) -> None:
if any(x in str(constructor_eager) for x in ("pyarrow_table", "modin")):
if any(x in str(constructor_eager) for x in ("pyarrow_table", "modin", "cudf")):
request.applymarker(pytest.mark.xfail)
if ("polars" in str(constructor_eager) and POLARS_VERSION < (1, 0)) or (
"pandas" in str(constructor_eager) and PANDAS_VERSION < (1, 1)
Expand Down Expand Up @@ -224,7 +229,7 @@ def test_pivot_sort_columns(
def test_pivot_names_out(
request: Any, constructor_eager: Any, kwargs: Any, expected: list[str]
) -> None:
if any(x in str(constructor_eager) for x in ("pyarrow_table", "modin")):
if any(x in str(constructor_eager) for x in ("pyarrow_table", "modin", "cudf")):
request.applymarker(pytest.mark.xfail)
if ("polars" in str(constructor_eager) and POLARS_VERSION < (1, 0)) or (
"pandas" in str(constructor_eager) and PANDAS_VERSION < (1, 1)
Expand Down

0 comments on commit ad20205

Please sign in to comment.