-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix spelling - fix versions of dependencies - create changelog entry
- Loading branch information
1 parent
002d69a
commit 54e87d0
Showing
7 changed files
with
43 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
icalendar | ||
pytz | ||
icalendar>=5.0.9 | ||
icalendar<6.0.0 | ||
pytz>=2023.3 | ||
python-dateutil>=2.8.1 | ||
x-wr-timezone < 1.0.0 | ||
x-wr-timezone >= 0.0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
"""This tests that RDATE can be a PERIOD. | ||
See https://github.com/niccokunzmann/python-recurring-ical-events/issues/113 | ||
Value Type: The default value type for this property is DATE-TIME. | ||
The value type can be set to DATE or PERIOD. | ||
If the "RDATE" property is | ||
specified as a PERIOD value the duration of the recurrence | ||
instance will be the one specified by the "RDATE" property, and | ||
not the duration of the recurrence instance defined by the | ||
"DTSTART" property. | ||
""" | ||
from datetime import datetime | ||
import pytz | ||
|
||
def test_rdate_is_period(calendars): | ||
"""The recurring event has a period rdate.""" | ||
event = calendars.test_issue_113_period_in_rdate.at("20231213") | ||
assert event["DTSTART"] == pytz.timezone("America/Vancouver").localize(datetime.datetime(2023, 12, 13, 12, 0)) | ||
def test_start_of_rdate(calendars): | ||
"""The event starts on that time.""" | ||
event = calendars.issue_113_period_in_rdate.at("20231213")[0] | ||
expected_start = pytz.timezone("America/Vancouver").localize(datetime(2023, 12, 13, 12, 0)) | ||
start = event["DTSTART"].dt | ||
assert start == expected_start | ||
|
||
def test_end_of_rdate(calendars): | ||
"""The event starts on that time.""" | ||
event = calendars.issue_113_period_in_rdate.at("20231213")[0] | ||
assert event["DTEND"].dt == pytz.timezone("America/Vancouver").localize(datetime(2023, 12, 13, 15, 0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters