diff --git a/test/conftest.py b/test/conftest.py index 88e566c..1542793 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -106,7 +106,12 @@ def walk(*args, **kw): return self._of(calendar) -@pytest.fixture(params=[icalendar.use_pytz, icalendar.use_zoneinfo], scope="module") +if hasattr(icalendar, 'use_pytz') and hasattr(icalendar, 'use_zoneinfo'): + tzps = [icalendar.use_pytz, icalendar.use_zoneinfo] +else: + tzps = [lambda: ...] + +@pytest.fixture(params=tzps, scope="module") def tzp(request): """The timezone provider supported by icalendar.""" return request.param