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:
Miss Islington (bot) 2022-01-17 23:33:00 -08:00 committed by GitHub
parent 7a822c9278
commit 42038d00ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 16 deletions

View file

@ -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'):