File: test_count.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 (19 lines) | stat: -rw-r--r-- 460 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
"""Create an test the count() method.

We want to be able to count the amount of events really fast.
"""

import pytest


@pytest.mark.parametrize(
    ("calendar", "count"),
    [
        ("issue_20_exdate_ignored", 7),
        ("issue_148_ignored_exdate", 2),
        ("issue_117_until_before_dtstart", 0),
    ],
)
def test_check_count_of_calendars(calendars, calendar, count):
    """We count the events."""
    assert calendars[calendar].count() == count