Skip to content

Commit 8d0a264

Browse files
committed
1 parent 2de134b commit 8d0a264

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pandas/tests/indexes/datetimes/test_date_range.py

+15
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,21 @@ def test_date_range_year_end(self, unit):
15331533
)
15341534
tm.assert_index_equal(rng, exp)
15351535

1536+
def test_date_range_partial_day_year_end(self, unit):
1537+
# GH#56134
1538+
rng = date_range(
1539+
start = "2021-12-31 00:00:01",
1540+
end = "2023-10-31 00:00:00",
1541+
freq="YE",
1542+
unit=unit,
1543+
)
1544+
exp = DatetimeIndex(
1545+
["2021-12-31 00:00:01", "2022-12-31 00:00:01"],
1546+
dtype=f"M8[{unit}]",
1547+
freq="YE",
1548+
)
1549+
tm.assert_index_equal(rng, exp)
1550+
15361551
def test_date_range_negative_freq_year_end(self, unit):
15371552
# GH#11018
15381553
rng = date_range("2011-12-31", freq="-2YE", periods=3, unit=unit)

0 commit comments

Comments
 (0)