@@ -887,7 +887,7 @@ def test_dt64arr_add_sub_td64ndarray(self, tz_naive_fixture, box_with_array):
887
887
888
888
result = dtarr - tdarr
889
889
tm .assert_equal (result , expected )
890
- msg = "cannot subtract|bad operand type for unary - "
890
+ msg = "cannot subtract|( bad|unsupported) operand type for unary"
891
891
with pytest .raises (TypeError , match = msg ):
892
892
tdarr - dtarr
893
893
@@ -1126,7 +1126,7 @@ def test_dt64arr_series_sub_tick_DateOffset(self, box_with_array):
1126
1126
1127
1127
result2 = - pd .offsets .Second (5 ) + ser
1128
1128
tm .assert_equal (result2 , expected )
1129
- msg = "bad operand type for unary"
1129
+ msg = "( bad|unsupported) operand type for unary"
1130
1130
with pytest .raises (TypeError , match = msg ):
1131
1131
pd .offsets .Second (5 ) - ser
1132
1132
@@ -1220,7 +1220,7 @@ def test_dt64arr_add_sub_relativedelta_offsets(self, box_with_array):
1220
1220
expected = DatetimeIndex ([x - off for x in vec_items ])
1221
1221
expected = tm .box_expected (expected , box_with_array )
1222
1222
tm .assert_equal (expected , vec - off )
1223
- msg = "bad operand type for unary"
1223
+ msg = "( bad|unsupported) operand type for unary"
1224
1224
with pytest .raises (TypeError , match = msg ):
1225
1225
off - vec
1226
1226
@@ -1336,7 +1336,7 @@ def test_dt64arr_add_sub_DateOffsets(
1336
1336
expected = DatetimeIndex ([offset + x for x in vec_items ])
1337
1337
expected = tm .box_expected (expected , box_with_array )
1338
1338
tm .assert_equal (expected , offset + vec )
1339
- msg = "bad operand type for unary"
1339
+ msg = "( bad|unsupported) operand type for unary"
1340
1340
with pytest .raises (TypeError , match = msg ):
1341
1341
offset - vec
1342
1342
@@ -1920,7 +1920,7 @@ def test_operators_datetimelike_with_timezones(self):
1920
1920
result = dt1 - td1 [0 ]
1921
1921
exp = (dt1 .dt .tz_localize (None ) - td1 [0 ]).dt .tz_localize (tz )
1922
1922
tm .assert_series_equal (result , exp )
1923
- msg = "bad operand type for unary"
1923
+ msg = "( bad|unsupported) operand type for unary"
1924
1924
with pytest .raises (TypeError , match = msg ):
1925
1925
td1 [0 ] - dt1
1926
1926
0 commit comments