Skip to content

Commit 049834c

Browse files
vstinnerrhansen
authored andcommitted
Update Lib/test/test_capi/test_watchers.py
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
1 parent caa33e9 commit 049834c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Lib/test/test_capi/test_watchers.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -626,17 +626,17 @@ def _in_outer():
626626
ctx_inner.run(lambda: unraisables.append(cm.unraisable))
627627
unraisables.append(cm.unraisable)
628628

629-
try:
630-
ctx_outer.run(_in_outer)
631-
self.assertEqual([x.err_msg for x in unraisables],
632-
["Exception ignored in Py_CONTEXT_SWITCHED "
633-
f"watcher callback for {ctx!r}"
634-
for ctx in [ctx_inner, ctx_outer]])
635-
self.assertEqual([str(x.exc_value) for x in unraisables],
636-
["boom!", "boom!"])
637-
finally:
638-
# Break reference cycle
639-
unraisables = None
629+
try:
630+
ctx_outer.run(_in_outer)
631+
self.assertEqual([x.err_msg for x in unraisables],
632+
["Exception ignored in Py_CONTEXT_SWITCHED "
633+
f"watcher callback for {ctx!r}"
634+
for ctx in [ctx_inner, ctx_outer]])
635+
self.assertEqual([str(x.exc_value) for x in unraisables],
636+
["boom!", "boom!"])
637+
finally:
638+
# Break reference cycle
639+
unraisables = None
640640

641641
def test_clear_out_of_range_watcher_id(self):
642642
with self.assertRaisesRegex(ValueError, r"Invalid context watcher ID -1"):

0 commit comments

Comments
 (0)