@pytest.mark.parametrize('names', [(None, None, None), ('foo', 'bar', None), ('foo', 'foo', 'foo')])
def test_dti_with_offset_series(self, tz, names):
    dti = pd.date_range('2017-01-01', periods=2, tz=tz, name=names[0])
    other = Series([pd.offsets.MonthEnd(), pd.offsets.Day(n=2)], name=names[1])
    expected_add = Series([(dti[n] + other[n]) for n in range(len(dti))], name=names[2])
    with tm.assert_produces_warning(PerformanceWarning):
        res = (dti + other)
    tm.assert_series_equal(res, expected_add)
    with tm.assert_produces_warning(PerformanceWarning):
        res2 = (other + dti)
    tm.assert_series_equal(res2, expected_add)
    expected_sub = Series([(dti[n] - other[n]) for n in range(len(dti))], name=names[2])
    with tm.assert_produces_warning(PerformanceWarning):
        res3 = (dti - other)
    tm.assert_series_equal(res3, expected_sub)
@pytest.mark.parametrize('names', [(None, None, None), ('foo', 'bar', None), ('foo', 'foo', 'foo')])
def test_dti_with_offset_series(self, tz, names):
    dti = pd.date_range('2017-01-01', periods=2, tz=tz, name=names[0])
    other = Series([pd.offsets.MonthEnd(), pd.offsets.Day(n=2)], name=names[1])
    expected_add = Series([(dti[n] + other[n]) for n in range(len(dti))], name=names[2])
    with tm.assert_produces_warning(PerformanceWarning):
        res = (dti + other)
    tm.assert_series_equal(res, expected_add)
    with tm.assert_produces_warning(PerformanceWarning):
        res2 = (other + dti)
    tm.assert_series_equal(res2, expected_add)
    expected_sub = Series([(dti[n] - other[n]) for n in range(len(dti))], name=names[2])
    with tm.assert_produces_warning(PerformanceWarning):
        res3 = (dti - other)
    tm.assert_series_equal(res3, expected_sub)