forked from niccokunzmann/python-recurring-ical-events
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified according to code review, refers to niccokunzmann#97 and cod…
…e reviews for commit d25b425
- Loading branch information
Showing
6 changed files
with
62 additions
and
31 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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
PRODID:-//Example Corp.//CalDAV Client//EN | ||
BEGIN:VTODO | ||
UID:19920901T130000Z-123408@host.com | ||
DTSTAMP:19920901T130000Z | ||
DUE:19920516T045959Z | ||
SUMMARY:Yearly Income Tax Preparation | ||
RRULE:FREQ=YEARLY | ||
CLASS:CONFIDENTIAL | ||
CATEGORIES:FAMILY,FINANCE | ||
PRIORITY:1 | ||
END:VTODO | ||
END:VCALENDAR |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import pytest | ||
from recurring_ical_events import DATE_MAX | ||
|
||
testdata_parametrized = pytest.mark.parametrize("ical_file", [ | ||
"issue_97_simple_todo", | ||
"issue_97_simple_journal", | ||
"issue_97_todo_nodtstart", | ||
]) | ||
|
||
@testdata_parametrized | ||
def test_recurring_task_is_not_included1(calendars, ical_file): | ||
"""The three files given starts in late 1991, no recurrences | ||
should be found before 1991. Refers to | ||
https://github.com/niccokunzmann/python-recurring-ical-events/issues/97. | ||
Test passes prior to fixing #97, should still pass after #97 is | ||
fixed. | ||
""" | ||
calendar = getattr(calendars, ical_file) | ||
tasks = calendar.between((1989, 1, 1), (1991,1,1)) | ||
assert not tasks | ||
|
||
@testdata_parametrized | ||
def test_recurring_task_is_not_included2(calendars, ical_file): | ||
"""Every recurrence of the three ical files is in October, hence | ||
no recurrences should be found. Refers to | ||
https://github.com/niccokunzmann/python-recurring-ical-events/issues/97. | ||
Test passes prior to fixing #97, should still pass after #97 is | ||
fixed. | ||
""" | ||
calendar = getattr(calendars, ical_file) | ||
tasks = calendar.between((1998, 1, 1), (1998,4,14)) | ||
assert not tasks | ||
|
||
@testdata_parametrized | ||
def test_recurring_task_is_repeated(calendars, ical_file): | ||
"""Expansion of a yearly task over seven years. | ||
The issue | ||
https://github.com/niccokunzmann/python-recurring-ical-events/issues/97 | ||
needs to be fixed before this test can pass | ||
""" | ||
calendar = getattr(calendars, ical_file) | ||
events = calendar.between((1995, 1, 1), (2022,1,1)) | ||
assert len(events) == 7 | ||
|
This file was deleted.
Oops, something went wrong.