Skip to content

Commit d156682

Browse files
committed
Added comments to test
1 parent c76178a commit d156682

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

tests/time_window_filter/test_recurrence_evaluator.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,26 +210,28 @@ def test_is_match_weekly_recurrence_with_occurrences_multi_day():
210210

211211
settings = TimeWindowFilterSettings(start=start, end=end, recurrence=recurrence)
212212

213+
# Before the start time, should not match
214+
assert is_match(settings, datetime(2025, 4, 7, 8, 0, 0)) is False # Monday
215+
213216
# First occurrence should match
214-
assert is_match(settings, datetime(2025, 4, 7, 10, 0, 0)) is True
215-
assert is_match(settings, datetime(2025, 4, 8, 10, 0, 0)) is True
217+
assert is_match(settings, datetime(2025, 4, 7, 10, 0, 0)) is True # Monday
218+
assert is_match(settings, datetime(2025, 4, 8, 10, 0, 0)) is True # Tuesday
216219

217220
# Second week occurrence shouldn't match
218-
assert is_match(settings, datetime(2025, 4, 14, 10, 0, 0)) is False
219-
assert is_match(settings, datetime(2025, 4, 15, 10, 0, 0)) is False
221+
assert is_match(settings, datetime(2025, 4, 14, 10, 0, 0)) is False # Monday
222+
assert is_match(settings, datetime(2025, 4, 15, 10, 0, 0)) is False # Tuesday
220223

221-
assert is_match(settings, datetime(2025, 4, 7, 8, 0, 0)) is False
222224
# Third week occurrence should match
223-
assert is_match(settings, datetime(2025, 4, 21, 10, 0, 0)) is True
224-
assert is_match(settings, datetime(2025, 4, 22, 10, 0, 0)) is True
225+
assert is_match(settings, datetime(2025, 4, 21, 10, 0, 0)) is True # Monday
226+
assert is_match(settings, datetime(2025, 4, 22, 10, 0, 0)) is True # Tuesday
225227

226228
# Fourth week occurrence shouldn't match
227-
assert is_match(settings, datetime(2025, 4, 28, 10, 0, 0)) is False
228-
assert is_match(settings, datetime(2025, 4, 29, 10, 0, 0)) is False
229+
assert is_match(settings, datetime(2025, 4, 28, 10, 0, 0)) is False # Monday
230+
assert is_match(settings, datetime(2025, 4, 29, 10, 0, 0)) is False # Tuesday
229231

230232
# Fifth week occurrence shouldn't match
231-
assert is_match(settings, datetime(2025, 5, 5, 10, 0, 0)) is False
232-
assert is_match(settings, datetime(2025, 5, 6, 10, 0, 0)) is False
233+
assert is_match(settings, datetime(2025, 5, 5, 10, 0, 0)) is False # Monday
234+
assert is_match(settings, datetime(2025, 5, 6, 10, 0, 0)) is False # Tuesday
233235

234236

235237
def test_weekly_recurrence_start_after_min_offset():

0 commit comments

Comments
 (0)