Skip to content

Commit 68d2491

Browse files
committed
fix test review
1 parent eb00fe8 commit 68d2491

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/tests/resample/test_resample_api.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,11 +1003,14 @@ def test_asfreq_respects_origin_with_fixed_freq_all_seconds_equal():
10031003

10041004
result = df.resample("1min", origin="start_day").asfreq()
10051005

1006-
# Expected index: match dtype while preserving freq
1006+
# Expected index: list of Timestamps, matching dtype
10071007
exp_idx = pd.DatetimeIndex(
1008-
date_range("2025-10-17 17:15:00", periods=3, freq="min").astype(
1009-
result.index.dtype
1010-
),
1008+
[
1009+
pd.Timestamp("2025-10-17 17:15:00"),
1010+
pd.Timestamp("2025-10-17 17:16:00"),
1011+
pd.Timestamp("2025-10-17 17:17:00"),
1012+
],
1013+
dtype=result.index.dtype,
10111014
freq="min",
10121015
)
10131016

0 commit comments

Comments
 (0)