Skip to content

Commit 874f758

Browse files
Update Lib/test/test_asyncio/test_taskgroups.py
1 parent 187abc7 commit 874f758

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_asyncio/test_taskgroups.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,9 @@ async def throw_error():
10851085
self.fail("should have raised one MyError in group")
10861086

10871087
# 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
1088+
# outside the task group and inside unittest internals
1089+
# we yield to the event loop with sleep(0) so that
1090+
# cancellation happens here and error is more understandable
10911091
await asyncio.sleep(0)
10921092

10931093

0 commit comments

Comments
 (0)