gh-102799: remove unnecessary calls to sys.exc_info() in tests (#102800)

This commit is contained in:
Irit Katriel 2023-03-18 07:19:38 +00:00 committed by GitHub
parent 72186aa637
commit b3cc11a08e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 124 additions and 124 deletions

View file

@ -1649,8 +1649,8 @@ class SizeofTest(unittest.TestCase):
check(_ast.AST(), size('P'))
try:
raise TypeError
except TypeError:
tb = sys.exc_info()[2]
except TypeError as e:
tb = e.__traceback__
# traceback
if tb is not None:
check(tb, size('2P2i'))