diff --git a/pandas/tests/frame/test_arithmetic.py b/pandas/tests/frame/test_arithmetic.py index a6f4e0e38ec5d..9c61f13b944ea 100644 --- a/pandas/tests/frame/test_arithmetic.py +++ b/pandas/tests/frame/test_arithmetic.py @@ -100,6 +100,18 @@ def test_df_flex_cmp_constant_return_types_empty(self, opname): # Arithmetic class TestFrameFlexArithmetic(object): + def test_df_add_td64_columnwise(self): + # GH#22534 Check that column-wise addition broadcasts correctly + dti = pd.date_range('2016-01-01', periods=10) + tdi = pd.timedelta_range('1', periods=10) + tser = pd.Series(tdi) + df = pd.DataFrame({0: dti, 1: tdi}) + + result = df.add(tser, axis=0) + expected = pd.DataFrame({0: dti + tdi, + 1: tdi + tdi}) + tm.assert_frame_equal(result, expected) + def test_df_add_flex_filled_mixed_dtypes(self): # GH#19611 dti = pd.date_range('2016-01-01', periods=3)