def test_add_datetimelike_and_dti(self, addend):
    dti = DatetimeIndex(['2011-01-01', '2011-01-02'])
    msg = 'cannot add DatetimeIndex and {0}'.format(type(addend).__name__)
    with tm.assert_raises_regex(TypeError, msg):
        (dti + addend)
    with tm.assert_raises_regex(TypeError, msg):
        (addend + dti)
def test_add_datetimelike_and_dti(self, addend):
    dti = DatetimeIndex(['2011-01-01', '2011-01-02'])
    msg = 'cannot add DatetimeIndex and {0}'.format(type(addend).__name__)
    with tm.assert_raises_regex(TypeError, msg):
        (dti + addend)
    with tm.assert_raises_regex(TypeError, msg):
        (addend + dti)