Skip to content

Commit 1684d8d

Browse files
CI: troubleshoot (#35044)
* CI: troubleshoot * test_ops_ndarray + lint fixup
1 parent 0159cba commit 1684d8d

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

pandas/tests/arithmetic/test_datetime64.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,7 @@ def test_dt64arr_add_sub_invalid(self, dti_freq, other, box_with_array):
10461046
"cannot (add|subtract)",
10471047
"cannot use operands with types",
10481048
"ufunc '?(add|subtract)'? cannot use operands with types",
1049+
"Concatenation operation is not implemented for NumPy arrays",
10491050
]
10501051
)
10511052
assert_invalid_addsub_type(dtarr, other, msg)

pandas/tests/arithmetic/test_numeric.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ def test_add_sub_timedeltalike_invalid(self, numeric_idx, other, box):
234234
"unsupported operand type|"
235235
"Addition/subtraction of integers and integer-arrays|"
236236
"Instead of adding/subtracting|"
237-
"cannot use operands with types dtype"
237+
"cannot use operands with types dtype|"
238+
"Concatenation operation is not implemented for NumPy arrays"
238239
)
239240
with pytest.raises(TypeError, match=msg):
240241
left + other
@@ -263,7 +264,8 @@ def test_add_sub_datetimelike_invalid(self, numeric_idx, other, box):
263264
msg = (
264265
"unsupported operand type|"
265266
"Cannot (add|subtract) NaT (to|from) ndarray|"
266-
"Addition/subtraction of integers and integer-arrays"
267+
"Addition/subtraction of integers and integer-arrays|"
268+
"Concatenation operation is not implemented for NumPy arrays"
267269
)
268270
with pytest.raises(TypeError, match=msg):
269271
left + other

pandas/tests/arithmetic/test_period.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,11 @@ def test_parr_add_sub_float_raises(self, op, other, box_with_array):
682682
dti = pd.DatetimeIndex(["2011-01-01", "2011-01-02"], freq="D")
683683
pi = dti.to_period("D")
684684
pi = tm.box_expected(pi, box_with_array)
685-
msg = r"unsupported operand type\(s\) for [+-]: .* and .*"
685+
msg = (
686+
r"unsupported operand type\(s\) for [+-]: .* and .*|"
687+
"Concatenation operation is not implemented for NumPy arrays"
688+
)
689+
686690
with pytest.raises(TypeError, match=msg):
687691
op(pi, other)
688692

pandas/tests/scalar/timedelta/test_arithmetic.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ def test_ops_ndarray(self):
263263
msg = r"unsupported operand type\(s\) for \+: 'Timedelta' and 'int'"
264264
with pytest.raises(TypeError, match=msg):
265265
td + np.array([1])
266-
msg = r"unsupported operand type\(s\) for \+: 'numpy.ndarray' and 'Timedelta'"
266+
msg = (
267+
r"unsupported operand type\(s\) for \+: 'numpy.ndarray' and 'Timedelta'|"
268+
"Concatenation operation is not implemented for NumPy arrays"
269+
)
267270
with pytest.raises(TypeError, match=msg):
268271
np.array([1]) + td
269272

0 commit comments

Comments
 (0)