Skip to content

Commit fd6a656

Browse files
mroeschkemeeseeksmachine
authored andcommitted
Backport PR pandas-dev#48065: CI/DEPS: Fix timezone test due to pytz upgrade
1 parent 05ae867 commit fd6a656

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/tests/tseries/offsets/test_dst.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
)
3232

3333
from pandas.tests.tseries.offsets.test_offsets import get_utc_offset_hours
34+
from pandas.util.version import Version
35+
36+
# error: Module has no attribute "__version__"
37+
pytz_version = Version(pytz.__version__) # type: ignore[attr-defined]
3438

3539

3640
class TestDST:
@@ -186,9 +190,8 @@ def test_all_offset_classes(self, tup):
186190
MonthBegin(66),
187191
"Africa/Kinshasa",
188192
marks=pytest.mark.xfail(
189-
# error: Module has no attribute "__version__"
190-
float(pytz.__version__) <= 2020.1, # type: ignore[attr-defined]
191-
reason="GH#41906",
193+
pytz_version < Version("2020.5") or pytz_version == Version("2022.2"),
194+
reason="GH#41906: pytz utc transition dates changed",
192195
),
193196
),
194197
(

0 commit comments

Comments
 (0)