test: Clamping-Tests Schaltjahr und Quartalsrhythmus
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,3 +17,13 @@ def test_quarterly_respects_item_bounds():
|
||||
def test_yearly():
|
||||
got = occurrences("yearly", 1, date(2026, 1, 1), date(2028, 12, 31))
|
||||
assert got == [date(2026, 1, 1), date(2027, 1, 1), date(2028, 1, 1)]
|
||||
|
||||
|
||||
def test_monthly_leap_year_clamping():
|
||||
got = occurrences("monthly", 31, date(2028, 1, 1), date(2028, 3, 31))
|
||||
assert got == [date(2028, 1, 31), date(2028, 2, 29), date(2028, 3, 31)]
|
||||
|
||||
|
||||
def test_quarterly_clamping():
|
||||
got = occurrences("quarterly", 31, date(2026, 1, 1), date(2026, 12, 31))
|
||||
assert got == [date(2026, 1, 31), date(2026, 4, 30), date(2026, 7, 31), date(2026, 10, 31)]
|
||||
|
||||
Reference in New Issue
Block a user