@@ -232,18 +232,23 @@ def test_enum_to_int():
232
232
def test_enum_overload_resolution ():
233
233
"""When performing overload resolution, enums should not be silently
234
234
converted to floats"""
235
- assert m .test_enum_overload_resolution (0.0 , 0.0 ) == 'f(float, float)'
236
- assert m .test_enum_overload_resolution (0 , 0 ) == 'f(float, float)'
237
- assert m .test_enum_overload_resolution (0.0 , m .ScopedEnum .Two ) == 'f(float, ScopedEnum)'
238
- assert m .test_enum_overload_resolution (0 , m .ScopedEnum .Two ) == 'f(float, ScopedEnum)'
235
+ assert m .test_enum_overload_resolution (0.0 , 0.0 ) == "f(float, float)"
236
+ assert m .test_enum_overload_resolution (0 , 0 ) == "f(float, float)"
237
+ assert (
238
+ m .test_enum_overload_resolution (0.0 , m .ScopedEnum .Two ) == "f(float, ScopedEnum)"
239
+ )
240
+ assert (
241
+ m .test_enum_overload_resolution (0 , m .ScopedEnum .Two ) == "f(float, ScopedEnum)"
242
+ )
239
243
240
244
241
245
def test_enum_to_float ():
242
246
"""Passing an enum to a function taking a float should trigger a type error"""
243
247
with pytest .raises (TypeError ) as execinfo :
244
248
m .test_enum_to_float (m .ScopedBoolEnum .TRUE )
245
- assert str (execinfo .value ).startswith ('TypeError: test_enum_to_float(): incompatible function arguments.' )
246
-
249
+ assert str (execinfo .value ).startswith (
250
+ "TypeError: test_enum_to_float(): incompatible function arguments."
251
+ )
247
252
248
253
249
254
def test_duplicate_enum_name ():
0 commit comments