aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-03-18 07:19:38 +0000
committerGitHub <noreply@github.com>2023-03-18 07:19:38 +0000
commitb3cc11a08e1e9121ddba3b9afb9fae032e86f449 (patch)
treee4993f932a173d482f06e797b9587a33aa7f0491 /Lib/test/test_sys.py
parent72186aa637bc88cd5f5e234803af64acab25994c (diff)
downloadcpython-b3cc11a08e1e9121ddba3b9afb9fae032e86f449.tar.gz
cpython-b3cc11a08e1e9121ddba3b9afb9fae032e86f449.zip
gh-102799: remove unnecessary calls to sys.exc_info() in tests (#102800)
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index b839985def9..fb578c5ae6e 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -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'))