Skip to content

Commit d8f1043

Browse files
committed
TST: Add regression test for DatetimeIndex.union across DST boundary (#62915)
1 parent 1b5b02c commit d8f1043

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/indexes/datetimes/test_setops.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,3 +757,13 @@ def test_intersection_non_nano_rangelike():
757757
freq="D",
758758
)
759759
tm.assert_index_equal(result, expected)
760+
761+
762+
def test_union_across_dst_boundary():
763+
# GH#62915 union should work when one index ends at DST boundary
764+
# and the other extends past it
765+
index1 = date_range("2025-10-25", "2025-10-26", freq="D", tz="Europe/Helsinki")
766+
index2 = date_range("2025-10-25", "2025-10-28", freq="D", tz="Europe/Helsinki")
767+
result = index1.union(index2)
768+
expected = date_range("2025-10-25", "2025-10-28", freq="D", tz="Europe/Helsinki")
769+
tm.assert_index_equal(result, expected)

0 commit comments

Comments
 (0)