Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test_asyncio
  • Loading branch information
iritkatriel committed Apr 5, 2023
commit eb54ba5f316bbd6981c5325bedd0bdf9557be7d6
2 changes: 1 addition & 1 deletion Lib/test/test_asyncio/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def on_timeout():
if (
timed_out
and task.uncancel() == 0
and sys.exc_info()[0] is asyncio.CancelledError
and isinstance(sys.exception(), asyncio.CancelledError)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add the isinstance() call? The original test insists that you get exactly CancelledError. I think that's useful to test for, since not all cancellation code is resilient to subclasses of CancelledError.

(In other cases below I don't mind.)

):
# Note the five rules that are needed here to satisfy proper
# uncancellation:
Expand Down