Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmylow committed Nov 24, 2023
1 parent 2de134b commit 8d0a264
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pandas/tests/indexes/datetimes/test_date_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,21 @@ def test_date_range_year_end(self, unit):
)
tm.assert_index_equal(rng, exp)

def test_date_range_partial_day_year_end(self, unit):
# GH#56134
rng = date_range(
start = "2021-12-31 00:00:01",
end = "2023-10-31 00:00:00",
freq="YE",
unit=unit,
)
exp = DatetimeIndex(
["2021-12-31 00:00:01", "2022-12-31 00:00:01"],
dtype=f"M8[{unit}]",
freq="YE",
)
tm.assert_index_equal(rng, exp)

def test_date_range_negative_freq_year_end(self, unit):
# GH#11018
rng = date_range("2011-12-31", freq="-2YE", periods=3, unit=unit)
Expand Down

0 comments on commit 8d0a264

Please sign in to comment.