Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
Merge branch 'main' into capi-write-unraisable-for-ignored-errors
  • Loading branch information
serhiy-storchaka committed Aug 7, 2023
commit 4e13132ae3d9705e0b29fb30ec36e099a5755a22
8 changes: 7 additions & 1 deletion Lib/test/test_capi/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,13 @@ def test_sys_getobject(self):
self.assertEqual(getobject('\U0001f40d'.encode()), 42)

self.assertIs(getobject(b'nonexisting'), AttributeError)
self.assertIs(getobject(b'\xff'), AttributeError)

with support.catch_unraisable_exception() as cm:
self.assertIs(getobject(b'\xff'), AttributeError)
self.assertEqual(cm.unraisable.exc_type, UnicodeDecodeError)
self.assertRegex(str(cm.unraisable.exc_value),
"'utf-8' codec can't decode")

# CRASHES getobject(NULL)

def test_sys_setobject(self):
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.