| 1 |
"""Test that different inputs are understood |
| 2 |
|
| 3 |
Also see test_time_arguments.py |
| 4 |
""" |
| 5 |
|
| 6 |
import pytest |
| 7 |
|
| 8 |
|
| 9 |
@pytest.mark.parametrize( |
| 10 |
("start", "stop", "event_count"), |
| 11 |
[ |
| 12 |
(2020, 2021, 366), |
| 13 |
((2020,), (2021,), 366), |
| 14 |
((2019, 2), (2020, 2), 334), |
| 15 |
((2019, 2, 4), (2019, 5, 21), 78), |
| 16 |
("20190204", "20190521", 78), |
| 17 |
("20190204T000000Z", "20190521T235959Z", 79), |
| 18 |
], |
| 19 |
) |
| 20 |
def test_calendar_between_allows_tuple(calendars, start, stop, event_count): |
| 21 |
events = calendars.one_day_event_repeat_every_day.between(start, stop) |
| 22 |
assert len(events) == event_count |