Skip to content

Commit ef30df8

Browse files
WillAydsimonjayhawkins
authored andcommitted
Updated error messages (#26726)
1 parent 9a67ff4 commit ef30df8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pandas/tests/arithmetic/test_timedelta64.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,8 @@ def test_td64arr_div_nat_invalid(self, box_with_array):
15371537
rng = timedelta_range('1 days', '10 days', name='foo')
15381538
rng = tm.box_expected(rng, box_with_array)
15391539

1540-
with pytest.raises(TypeError, match='true_divide cannot use operands'):
1540+
with pytest.raises(TypeError,
1541+
match="'?true_divide'? cannot use operands"):
15411542
rng / pd.NaT
15421543
with pytest.raises(TypeError, match='Cannot divide NaTType by'):
15431544
pd.NaT / rng

pandas/tests/indexes/timedeltas/test_arithmetic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def test_ops_ndarray(self):
218218
expected = pd.to_timedelta(['2 days']).values
219219
tm.assert_numpy_array_equal(td * np.array([2]), expected)
220220
tm.assert_numpy_array_equal(np.array([2]) * td, expected)
221-
msg = ("ufunc multiply cannot use operands with types"
221+
msg = ("ufunc '?multiply'? cannot use operands with types"
222222
r" dtype\('<m8\[ns\]'\) and dtype\('<m8\[ns\]'\)")
223223
with pytest.raises(TypeError, match=msg):
224224
td * other

0 commit comments

Comments
 (0)