File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1178,11 +1178,12 @@ class X(Exception):
1178
1178
for moduleName in 'builtins' , '__main__' , 'some_module' :
1179
1179
with self .subTest (moduleName = moduleName ):
1180
1180
A .B .X .__module__ = moduleName
1181
- with test .support .captured_stderr () as stderr , \
1182
- test . support . swap_attr ( sys , 'unraisablehook' ,
1183
- sys . __unraisablehook__ ):
1181
+ with test .support .captured_stderr () as stderr , test . support . swap_attr (
1182
+ sys , 'unraisablehook' , sys . __unraisablehook__
1183
+ ):
1184
1184
expected = self .write_unraisable_exc (
1185
- A .B .X (), "msg" , "obj" );
1185
+ A .B .X (), "msg" , "obj"
1186
+ )
1186
1187
report = stderr .getvalue ()
1187
1188
self .assertIn (A .B .X .__qualname__ , report )
1188
1189
if moduleName in ['builtins' , '__main__' ]:
You can’t perform that action at this time.
0 commit comments