@@ -232,25 +232,29 @@ def test_no_mixed_overloads():
232232
233233 with pytest .raises (RuntimeError ) as excinfo :
234234 m .ExampleMandA .add_mixed_overloads1 ()
235- assert str (
236- excinfo .value
237- ) == "overloading a method with both static and instance methods is not supported; " + (
238- "#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for more details"
239- if not detailed_error_messages_enabled
240- else "error while attempting to bind static method ExampleMandA.overload_mixed1"
241- "(arg0: float) -> str"
235+ assert (
236+ str (excinfo .value )
237+ == "overloading a method with both static and instance methods is not supported; "
238+ + (
239+ "#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for more details"
240+ if not detailed_error_messages_enabled
241+ else "error while attempting to bind static method ExampleMandA.overload_mixed1"
242+ "(arg0: float) -> str"
243+ )
242244 )
243245
244246 with pytest .raises (RuntimeError ) as excinfo :
245247 m .ExampleMandA .add_mixed_overloads2 ()
246- assert str (
247- excinfo .value
248- ) == "overloading a method with both static and instance methods is not supported; " + (
249- "#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for more details"
250- if not detailed_error_messages_enabled
251- else "error while attempting to bind instance method ExampleMandA.overload_mixed2"
252- "(self: pybind11_tests.methods_and_attributes.ExampleMandA, arg0: int, arg1: int)"
253- " -> str"
248+ assert (
249+ str (excinfo .value )
250+ == "overloading a method with both static and instance methods is not supported; "
251+ + (
252+ "#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for more details"
253+ if not detailed_error_messages_enabled
254+ else "error while attempting to bind instance method ExampleMandA.overload_mixed2"
255+ "(self: pybind11_tests.methods_and_attributes.ExampleMandA, arg0: int, arg1: int)"
256+ " -> str"
257+ )
254258 )
255259
256260
0 commit comments