@@ -172,31 +172,24 @@ def test_div_td64arr(self, left, box_cls):
172
172
with pytest .raises (TypeError , match = msg ):
173
173
left // right
174
174
175
- # TODO: de-duplicate with test_numeric_arr_mul_tdscalar
176
- def test_ops_series (self ):
177
- # regression test for G#H8813
178
- td = Timedelta ("1 day" )
179
- other = pd .Series ([1 , 2 ])
180
- expected = pd .Series (pd .to_timedelta (["1 day" , "2 days" ]))
181
- tm .assert_series_equal (expected , td * other )
182
- tm .assert_series_equal (expected , other * td )
183
-
184
- # TODO: also test non-nanosecond timedelta64 and Tick objects;
175
+ # TODO: also test Tick objects;
185
176
# see test_numeric_arr_rdiv_tdscalar for note on these failing
186
177
@pytest .mark .parametrize (
187
178
"scalar_td" ,
188
179
[
189
180
Timedelta (days = 1 ),
190
181
Timedelta (days = 1 ).to_timedelta64 (),
191
182
Timedelta (days = 1 ).to_pytimedelta (),
183
+ Timedelta (days = 1 ).to_timedelta64 ().astype ("timedelta64[s]" ),
184
+ Timedelta (days = 1 ).to_timedelta64 ().astype ("timedelta64[ms]" ),
192
185
],
193
186
ids = lambda x : type (x ).__name__ ,
194
187
)
195
188
def test_numeric_arr_mul_tdscalar (self , scalar_td , numeric_idx , box_with_array ):
196
189
# GH#19333
197
190
box = box_with_array
198
191
index = numeric_idx
199
- expected = pd .TimedeltaIndex ([pd .Timedelta (days = n ) for n in range (5 )])
192
+ expected = pd .TimedeltaIndex ([pd .Timedelta (days = n ) for n in range (len ( index ) )])
200
193
201
194
index = tm .box_expected (index , box )
202
195
expected = tm .box_expected (expected , box )
0 commit comments