Skip to content

Commit 3359257

Browse files
AncientRicklesproost
authored andcommitted
STYLE: string formatting in test-expressions.py for issue 29886 (pandas-dev#30321)
1 parent dcd5733 commit 3359257

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/test_expressions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ def testit():
261261
def test_bool_ops_raise_on_arithmetic(self, op_str, opname):
262262
df = DataFrame({"a": np.random.rand(10) > 0.5, "b": np.random.rand(10) > 0.5})
263263

264-
msg = "operator %r not implemented for bool dtypes"
264+
msg = f"operator {repr(op_str)} not implemented for bool dtypes"
265265
f = getattr(operator, opname)
266-
err_msg = re.escape(msg % op_str)
266+
err_msg = re.escape(msg)
267267

268268
with pytest.raises(NotImplementedError, match=err_msg):
269269
f(df, df)

0 commit comments

Comments
 (0)