Skip to content

Commit

Permalink
Update python/cudf/cudf/tests/test_series.py
Browse files Browse the repository at this point in the history
Co-authored-by: GALI PREM SAGAR <[email protected]>
  • Loading branch information
mroeschke and galipremsagar authored Nov 28, 2023
1 parent c69f80e commit 4a45752
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/cudf/cudf/tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2659,15 +2659,16 @@ def test_series_setitem_mixed_bool_dtype():
[np.timedelta64("nat"), np.timedelta64(1)],
],
)
def test_series_np_array_nat_nan_as_null_false(nat, value, request):
@pytest.mark.parametrize("nan_as_null", [True, False])
def test_series_np_array_nat_nan_as_nulls(nat, value, request, nan_as_null):
expected = np.array([nat, value])
if expected.dtype.kind == "m":
request.applymarker(
pytest.mark.xfail(
raises=TypeError, reason="timedelta64 not supported by cupy"
)
)
ser = cudf.Series(expected, nan_as_null=False)
ser = cudf.Series(expected, nan_as_null=nan_as_null)
assert ser[0] is pd.NaT
assert ser[1] == value

Expand Down

0 comments on commit 4a45752

Please sign in to comment.