mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)
(cherry picked from commit a287b31bcb)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
7a822c9278
commit
42038d00ea
6 changed files with 14 additions and 16 deletions
|
|
@ -132,8 +132,8 @@ def test_excluding_predicates(self):
|
|||
self.istest(inspect.iscode, 'mod.spam.__code__')
|
||||
try:
|
||||
1/0
|
||||
except:
|
||||
tb = sys.exc_info()[2]
|
||||
except Exception as e:
|
||||
tb = e.__traceback__
|
||||
self.istest(inspect.isframe, 'tb.tb_frame')
|
||||
self.istest(inspect.istraceback, 'tb')
|
||||
if hasattr(types, 'GetSetDescriptorType'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue