We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cc8c13 commit 6896cf6Copy full SHA for 6896cf6
tests/conftest.py
@@ -1,3 +1,4 @@
1
+import pytest
2
3
try:
4
import zoneinfo
@@ -24,3 +25,19 @@ def pytest_generate_tests(metafunc):
24
25
from babel.core import get_global
26
metafunc.parametrize("locale", list(get_global('rbnf_locales')))
27
break
28
+
29
30
+@pytest.fixture(params=["pytz.timezone", "zoneinfo.ZoneInfo"], scope="package")
31
+def timezone_getter(request):
32
+ if request.param == "pytz.timezone":
33
+ if pytz:
34
+ return pytz.timezone
35
+ else:
36
+ pytest.skip("pytz not available")
37
+ elif request.param == "zoneinfo.ZoneInfo":
38
+ if zoneinfo:
39
+ return zoneinfo.ZoneInfo
40
41
+ pytest.skip("zoneinfo not available")
42
43
+ raise NotImplementedError
0 commit comments