File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 1- import sys
21from datetime import datetime
32from zoneinfo import ZoneInfo
43
@@ -273,18 +272,12 @@ def test_normalize_max2one(data_in, expected):
273272 ],
274273)
275274def 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-
282275 got = tools .localize_to_utc (** input )
283276
284- if isinstance ( got , pd . Series ):
285- pd . testing . assert_series_equal (got , expected , check_dtype = check_dtype )
286- elif isinstance (got , pd . DataFrame ):
287- pd .testing .assert_frame_equal (got , expected , check_dtype = check_dtype )
277+ # Pandas has wonky dtype check in Python 3.9.
278+ if isinstance (got , ( pd . Series , pd . DataFrame )):
279+ pd . testing . assert_index_equal (got . index , expected . index )
280+ np .testing .assert_array_equal (got . to_numpy () , expected . to_numpy () )
288281 else :
289282 assert got == expected
290283
You can’t perform that action at this time.
0 commit comments