gh-102799: use sys.exception() instead of sys.exc_info() in tests (#103293)

This commit is contained in:
Irit Katriel 2023-04-06 11:08:25 +01:00 committed by GitHub
parent a44568b80d
commit 482b6eeadc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 68 additions and 71 deletions

View file

@ -606,7 +606,7 @@ class BaseTaskTests:
if (
timed_out
and task.uncancel() == 0
and sys.exc_info()[0] is asyncio.CancelledError
and type(sys.exception()) is asyncio.CancelledError
):
# Note the five rules that are needed here to satisfy proper
# uncancellation: