File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ import sys
12from datetime import datetime
23from zoneinfo import ZoneInfo
34
@@ -272,12 +273,18 @@ def test_normalize_max2one(data_in, expected):
272273 ],
273274)
274275def test_localize_to_utc (input , expected ):
276+ # Pandas has bad dtype check in Python 3.9.
277+ if (sys .version_info [0 ], sys .version_info [1 ]) == (3 , 9 ):
278+ check_dtype = False
279+ else :
280+ check_dtype = True
281+
275282 got = tools .localize_to_utc (** input )
276283
277284 if isinstance (got , pd .Series ):
278- pd .testing .assert_series_equal (got , expected )
285+ pd .testing .assert_series_equal (got , expected , check_dtype = check_dtype )
279286 elif isinstance (got , pd .DataFrame ):
280- pd .testing .assert_frame_equal (got , expected )
287+ pd .testing .assert_frame_equal (got , expected , check_dtype = check_dtype )
281288 else :
282289 assert got == expected
283290
You can’t perform that action at this time.
0 commit comments