From edc3f26eb18c286bf4584bcf1464562685c9bd58 Mon Sep 17 00:00:00 2001 From: Joshua King Date: Mon, 14 Sep 2026 14:48:38 -0400 Subject: [PATCH] test: weekly end==start case is now a true single-day window --- tests/test_recurrence_bounds.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_recurrence_bounds.py b/tests/test_recurrence_bounds.py index 1633470..2098d24 100644 --- a/tests/test_recurrence_bounds.py +++ b/tests/test_recurrence_bounds.py @@ -258,10 +258,12 @@ def test_end_date_equal_to_start_date_allows_one_day_window() -> None: assert occurs_on(daily, _d("2026-03-16")) is False weekly = ScheduleRule( - rule_type=RuleType.WEEKLY, weekday_set={1}, # 2026-03-15 is a Sun - start_date="2026-03-09", end_date="2026-03-15", + rule_type=RuleType.WEEKLY, weekday_set={1}, # 2026-03-10 is a Tue + start_date="2026-03-10", end_date="2026-03-10", ) - # The window is one week; Tue Mar 10 fires inside it. + # The window is a SINGLE day (end == start, a Tuesday in-set): + # it fires, and the following Tuesday is out of window. + assert _d("2026-03-10").weekday() == 1 assert occurs_on(weekly, _d("2026-03-10")) is True assert occurs_on(weekly, _d("2026-03-17")) is False