We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6a985a commit ee4016bCopy full SHA for ee4016b
Lib/test/test_sys.py
@@ -1178,11 +1178,12 @@ class X(Exception):
1178
for moduleName in 'builtins', '__main__', 'some_module':
1179
with self.subTest(moduleName=moduleName):
1180
A.B.X.__module__ = moduleName
1181
- with test.support.captured_stderr() as stderr, \
1182
- test.support.swap_attr(sys, 'unraisablehook',
1183
- sys.__unraisablehook__):
+ with test.support.captured_stderr() as stderr, test.support.swap_attr(
+ sys, 'unraisablehook', sys.__unraisablehook__
+ ):
1184
expected = self.write_unraisable_exc(
1185
- A.B.X(), "msg", "obj");
+ A.B.X(), "msg", "obj"
1186
+ )
1187
report = stderr.getvalue()
1188
self.assertIn(A.B.X.__qualname__, report)
1189
if moduleName in ['builtins', '__main__']:
0 commit comments