We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 187abc7 commit 874f758Copy full SHA for 874f758
Lib/test/test_asyncio/test_taskgroups.py
@@ -1085,9 +1085,9 @@ async def throw_error():
1085
self.fail("should have raised one MyError in group")
1086
1087
# if this test fails this current task will be cancelled
1088
- # outside the TG and inside unittest internals
1089
- # we add somewhere to cancel here so the test failure message
1090
- # is more understandable
+ # outside the task group and inside unittest internals
+ # we yield to the event loop with sleep(0) so that
+ # cancellation happens here and error is more understandable
1091
await asyncio.sleep(0)
1092
1093
0 commit comments