diff --git a/pandas/tests/arithmetic/test_numeric.py b/pandas/tests/arithmetic/test_numeric.py index 04ba41307d0ef..b5f14700088bb 100644 --- a/pandas/tests/arithmetic/test_numeric.py +++ b/pandas/tests/arithmetic/test_numeric.py @@ -172,16 +172,7 @@ def test_div_td64arr(self, left, box_cls): with pytest.raises(TypeError, match=msg): left // right - # TODO: de-duplicate with test_numeric_arr_mul_tdscalar - def test_ops_series(self): - # regression test for G#H8813 - td = Timedelta("1 day") - other = pd.Series([1, 2]) - expected = pd.Series(pd.to_timedelta(["1 day", "2 days"])) - tm.assert_series_equal(expected, td * other) - tm.assert_series_equal(expected, other * td) - - # TODO: also test non-nanosecond timedelta64 and Tick objects; + # TODO: also test Tick objects; # see test_numeric_arr_rdiv_tdscalar for note on these failing @pytest.mark.parametrize( "scalar_td", @@ -189,6 +180,8 @@ def test_ops_series(self): Timedelta(days=1), Timedelta(days=1).to_timedelta64(), Timedelta(days=1).to_pytimedelta(), + Timedelta(days=1).to_timedelta64().astype("timedelta64[s]"), + Timedelta(days=1).to_timedelta64().astype("timedelta64[ms]"), ], ids=lambda x: type(x).__name__, ) @@ -196,7 +189,7 @@ def test_numeric_arr_mul_tdscalar(self, scalar_td, numeric_idx, box_with_array): # GH#19333 box = box_with_array index = numeric_idx - expected = pd.TimedeltaIndex([pd.Timedelta(days=n) for n in range(5)]) + expected = pd.TimedeltaIndex([pd.Timedelta(days=n) for n in range(len(index))]) index = tm.box_expected(index, box) expected = tm.box_expected(expected, box)