We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dcd5733 commit 3359257Copy full SHA for 3359257
pandas/tests/test_expressions.py
@@ -261,9 +261,9 @@ def testit():
261
def test_bool_ops_raise_on_arithmetic(self, op_str, opname):
262
df = DataFrame({"a": np.random.rand(10) > 0.5, "b": np.random.rand(10) > 0.5})
263
264
- msg = "operator %r not implemented for bool dtypes"
+ msg = f"operator {repr(op_str)} not implemented for bool dtypes"
265
f = getattr(operator, opname)
266
- err_msg = re.escape(msg % op_str)
+ err_msg = re.escape(msg)
267
268
with pytest.raises(NotImplementedError, match=err_msg):
269
f(df, df)
0 commit comments