@pytest.mark.parametrize('klass,assert_func', [(Series, tm.assert_series_equal), (DatetimeIndex, tm.assert_index_equal)])
def test_dt64_with_offset_array(klass, assert_func):
    box = (Series if (klass is Series) else pd.Index)
    with tm.assert_produces_warning(PerformanceWarning):
        s = klass([Timestamp('2000-1-1'), Timestamp('2000-2-1')])
        result = (s + box([pd.offsets.DateOffset(years=1), pd.offsets.MonthEnd()]))
        exp = klass([Timestamp('2001-1-1'), Timestamp('2000-2-29')])
        assert_func(result, exp)
        result = (s + box([pd.offsets.DateOffset(years=1), pd.offsets.DateOffset(years=1)]))
        exp = klass([Timestamp('2001-1-1'), Timestamp('2001-2-1')])
        assert_func(result, exp)
@pytest.mark.parametrize('klass,assert_func', [(Series, tm.assert_series_equal), (DatetimeIndex, tm.assert_index_equal)])
def test_dt64_with_offset_array(klass, assert_func):
    box = (Series if (klass is Series) else pd.Index)
    with tm.assert_produces_warning(PerformanceWarning):
        s = klass([Timestamp('2000-1-1'), Timestamp('2000-2-1')])
        result = (s + box([pd.offsets.DateOffset(years=1), pd.offsets.MonthEnd()]))
        exp = klass([Timestamp('2001-1-1'), Timestamp('2000-2-29')])
        assert_func(result, exp)
        result = (s + box([pd.offsets.DateOffset(years=1), pd.offsets.DateOffset(years=1)]))
        exp = klass([Timestamp('2001-1-1'), Timestamp('2001-2-1')])
        assert_func(result, exp)