File: test_issue_179_span_in_event.py

package info (click to toggle)
python-recurring-ical-events 3.3.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,128 kB
  • sloc: python: 2,896; sh: 15; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""We want to check that even if the span falls into a day long event, the event is found.

RFC 5545:

    For cases where a "VEVENT" calendar component
    specifies a "DTSTART" property with a DATE value type but no
    "DTEND" nor "DURATION" property, the event's duration is taken to
    be one day.
"""

import pytest


@pytest.mark.parametrize(
    "dt",
    [
        (1997, 11, 2, 0),
        (1997, 11, 2, 1),
    ],
)
def test_event_occurs(calendars, dt):
    """The event should occur."""
    events = calendars.issue_179_example.at(dt)
    assert len(events) == 1