From 2fa65f1befbc6c11ff66648aef6888ce78d62aa8 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sat, 23 Dec 2023 19:11:35 +0000 Subject: [PATCH] reproduce error from https://github.com/niccokunzmann/python-recurring-ical-events/pull/121 --- test/calendars/date-exclude.txt | 20 ++++++++++++++++++++ test/test_examples.py | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100644 test/calendars/date-exclude.txt diff --git a/test/calendars/date-exclude.txt b/test/calendars/date-exclude.txt new file mode 100644 index 0000000..d31528b --- /dev/null +++ b/test/calendars/date-exclude.txt @@ -0,0 +1,20 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//PYVOBJECT//NONSGML Version 1//EN +BEGIN:VEVENT +UID:d9b8ba07-1d4a-40ec-bdb5-c4f538d261af +DTSTART:20231215T060000Z +DTEND:20231215T070000Z +CATEGORIES:Kategorie +CLASS:PUBLIC +CREATED:20231215T070936Z +DESCRIPTION:La concha de su madre +DTSTAMP:20231215T154916Z +EXDATE;VALUE=DATE:20231216 +LAST-MODIFIED:20231215T154916Z +RRULE:FREQ=DAILY;UNTIL=20231218T023000Z;FREQ=DAILY +SEQUENCE:35 +SUMMARY:Tag ausgeschlossen +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR diff --git a/test/test_examples.py b/test/test_examples.py index d5f8d3b..320b962 100644 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -73,3 +73,10 @@ def test_german_holidays(calendars): holidays = calendars.Germany_Holidays.at(2020) assert len(holidays) == 17 + +def test_exdate_date(calendars): + """The EXDATE can be a date, too. + + See https://github.com/niccokunzmann/python-recurring-ical-events/pull/121 + """ + assert calendars.date_exclude.at("20231216") == []