Skip to content

Commit

Permalink
Avoid pytest.warns in test_to_datetime for GPU CI (#10902)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzamora committed Feb 7, 2024
1 parent d89d559 commit 7e04ff7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dask/dataframe/tests/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5148,8 +5148,9 @@ def test_to_datetime(gpu):
)
else:
ctx = contextlib.nullcontext()
ctx_expected = contextlib.nullcontext() if gpu else ctx

with ctx:
with ctx_expected:
expected = xd.to_datetime(s, infer_datetime_format=True)
with ctx:
result = dd.to_datetime(ds, infer_datetime_format=True)
Expand All @@ -5158,7 +5159,7 @@ def test_to_datetime(gpu):
result = dd.to_datetime(s, infer_datetime_format=True)
assert_eq(expected, result, check_dtype=check_dtype)

with ctx:
with ctx_expected:
expected = xd.to_datetime(s.index, infer_datetime_format=True)
with ctx:
result = dd.to_datetime(ds.index, infer_datetime_format=True)
Expand Down

0 comments on commit 7e04ff7

Please sign in to comment.