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

@ -5097,8 +5097,7 @@ class BasicConfigTest(unittest.TestCase):
message = []
def dummy_handle_error(record):
_, v, _ = sys.exc_info()
message.append(str(v))
message.append(str(sys.exception()))
handler.handleError = dummy_handle_error
logging.debug('The Øresund Bridge joins Copenhagen to Malmö')