Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test_asyncio, test_class, test_logging
  • Loading branch information
iritkatriel committed Apr 5, 2023
commit 6d9da0949267746c5caa2abfca8d53f8198fd765
2 changes: 1 addition & 1 deletion Lib/test/test_asyncio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def tearDown(self):

# Detect CPython bug #23353: ensure that yield/yield-from is not used
# in an except block of a generator
self.assertEqual(sys.exc_info(), (None, None, None))
self.assertIsNone(sys.exception())

self.doCleanups()
threading_helper.threading_cleanup(*self._thread_cleanup)
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def __init__(self):
a = A()
self.assertEqual(_testcapi.hasattr_string(a, "attr"), True)
self.assertEqual(_testcapi.hasattr_string(a, "noattr"), False)
self.assertEqual(sys.exc_info(), (None, None, None))
self.assertIsNone(sys.exception())

def testDel(self):
x = []
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -5097,8 +5097,7 @@ def test_encoding_errors_none(self):
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ö')
Expand Down