@@ -1255,8 +1255,14 @@ def test_td64arr_add_sub_tdi(self, box_with_array, names):
12551255
12561256 tdi = TimedeltaIndex (["0 days" , "1 day" ], name = names [1 ])
12571257 tdi = np .array (tdi ) if box in [tm .to_array , pd .array ] else tdi
1258- ser = Series ([Timedelta (hours = 3 ), Timedelta (hours = 4 )], name = names [0 ])
1259- expected = Series ([Timedelta (hours = 3 ), Timedelta (days = 1 , hours = 4 )], name = exname )
1258+ ser = Series (
1259+ [Timedelta (hours = 3 ), Timedelta (hours = 4 )], name = names [0 ], dtype = "m8[ns]"
1260+ )
1261+ expected = Series (
1262+ [Timedelta (hours = 3 ), Timedelta (days = 1 , hours = 4 )],
1263+ name = exname ,
1264+ dtype = "m8[ns]" ,
1265+ )
12601266
12611267 ser = tm .box_expected (ser , box )
12621268 expected = tm .box_expected (expected , box )
@@ -1270,7 +1276,9 @@ def test_td64arr_add_sub_tdi(self, box_with_array, names):
12701276 assert_dtype (result , "timedelta64[ns]" )
12711277
12721278 expected = Series (
1273- [Timedelta (hours = - 3 ), Timedelta (days = 1 , hours = - 4 )], name = exname
1279+ [Timedelta (hours = - 3 ), Timedelta (days = 1 , hours = - 4 )],
1280+ name = exname ,
1281+ dtype = "m8[ns]" ,
12741282 )
12751283 expected = tm .box_expected (expected , box )
12761284
@@ -1666,7 +1674,7 @@ def test_td64arr_mul_masked(self, dtype, box_with_array):
16661674 other = Series (np .arange (5 ), dtype = dtype )
16671675 other = tm .box_expected (other , box_with_array )
16681676
1669- expected = Series ([Timedelta (hours = n ** 2 ) for n in range (5 )])
1677+ expected = Series ([Timedelta (hours = n ** 2 ) for n in range (5 )], dtype = "m8[ns]" )
16701678 expected = tm .box_expected (expected , box_with_array )
16711679 if dtype == "int64[pyarrow]" :
16721680 expected = expected .astype ("duration[ns][pyarrow]" )
0 commit comments