Skip to content

Commit 2b4561f

Browse files
authored
TST: Add regression test for DatetimeIndex.union across DST boundary (#62915) (#63223)
1 parent 11c8fbe commit 2b4561f

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
@@ -759,3 +759,13 @@ def test_intersection_non_nano_rangelike():
759759
freq="D",
760760
)
761761
tm.assert_index_equal(result, expected)
762+
763+
764+
def test_union_across_dst_boundary():
765+
# GH#62915 union should work when one index ends at DST boundary
766+
# and the other extends past it
767+
index1 = date_range("2025-10-25", "2025-10-26", freq="D", tz="Europe/Helsinki")
768+
index2 = date_range("2025-10-25", "2025-10-28", freq="D", tz="Europe/Helsinki")
769+
result = index1.union(index2)
770+
expected = date_range("2025-10-25", "2025-10-28", freq="D", tz="Europe/Helsinki")
771+
tm.assert_index_equal(result, expected)

0 commit comments

Comments
 (0)