Skip to content

Commit 093fe6a

Browse files
authored
Fix test_resample index dtype checking for pandas 2.2 (#15058)
I think this got unintentionally fixed in pandas 2.2, but `pandas.testing.assert_series_equal` will be strict about checking a Series's Index's dtype for date-likes. Since pandas always returns `ns` in resample and cudf tries to match the resolution frequency (IMO the better behavior), need to specify `check_index=False` in pandas 2.2 Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #15058
1 parent 44913fc commit 093fe6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/cudf/cudf/tests/test_resampling.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66

77
import cudf
8-
from cudf.core._compat import PANDAS_GE_200
8+
from cudf.core._compat import PANDAS_GE_200, PANDAS_GE_220
99
from cudf.testing._utils import assert_eq
1010

1111

@@ -31,6 +31,7 @@ def test_series_downsample_simple(ts_resolution):
3131
assert_resample_results_equal(
3232
psr.resample("3min").sum(),
3333
gsr.resample("3min").sum(),
34+
check_index=not PANDAS_GE_220,
3435
)
3536

3637

@@ -43,6 +44,7 @@ def test_series_upsample_simple():
4344
assert_resample_results_equal(
4445
psr.resample("3min").sum(),
4546
gsr.resample("3min").sum(),
47+
check_index=not PANDAS_GE_220,
4648
)
4749

4850

0 commit comments

Comments
 (0)