Debian Codegraph @

recurring_ical_events/test/test_issue_164_duplicated_event.py

raw symbols SCIP
1 """Duplicated instances of the same event are returned in v3.1.0. The bug is not present in v2.1.3.
2
3 See https://github.com/niccokunzmann/python-recurring-ical-events/issues/164
4 """
5
6
7 def test_event_is_only_returned_once(calendars):
8 """We should not see the same event twice!"""
9 events = calendars.issue_164_duplicated_event.at([2024, 8])
10 for event in events:
11 start = event["DTSTART"].dt
12 duration = event["DTEND"].dt - event["DTSTART"].dt
13 print(f"start {start} duration {duration}")
14 print(event.to_ical().decode())
15 assert len(events) == 2