Skip to content

Commit

Permalink
FIX skip test for change in behavior of nulls of cudf.pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
dantegd committed Jan 21, 2025
1 parent 8b72717 commit 75dd2da
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions python/cuml/cuml/tests/test_input_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
# Copyright (c) 2019-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,6 +35,7 @@
np = cpu_only_import("numpy")

nbcuda = gpu_only_import_from("numba", "cuda")
cudf_pandas_active = gpu_only_import_from("cudf.pandas", "LOADED")
pdDF = cpu_only_import_from("pandas", "DataFrame")


Expand Down Expand Up @@ -446,11 +447,14 @@ def test_tocupy_missing_values_handling():
assert str(array.dtype) == "float64"
assert cp.isnan(array[1])

with pytest.raises(ValueError):
df = cudf.Series(data=[7, None, 3])
array, n_rows, n_cols, dtype = input_to_cupy_array(
df, fail_on_null=True
)
# cudf.pandas now mimics pandas better for handling None, so we don't
# need to fail and raise this error when cudf.pandas is active.
if not cudf_pandas_active:
with pytest.raises(ValueError):
df = cudf.Series(data=[7, None, 3])
array, n_rows, n_cols, dtype = input_to_cupy_array(
df, fail_on_null=True
)


@pytest.mark.cudf_pandas
Expand Down

0 comments on commit 75dd2da

Please sign in to comment.