8000 gh-106672: C API: Report indiscriminately ignored errors by serhiy-storchaka · Pull Request #106674 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-106672: C API: Report indiscriminately ignored errors #106674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Fix merging error.
  • Loading branch information
serhiy-storchaka committed Aug 26, 2023
commit 82efd1cee9e6d8ec39f258ae52f3d7ececd3b4df
3 changes: 1 addition & 2 deletions Lib/test/test_capi/test_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,11 @@ def test_dict_getitemstring(self):
self.assertIs(getitemstring(dct2, b'b'), KeyError)

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

self.assertIs(getitemstring({}, INVALID_UTF8), KeyError)
self.assertIs(getitemstring(42, b'a'), KeyError)
self.assertIs(getitemstring([], b'a'), KeyError)
# CRASHES getitemstring({}, NULL)
Expand Down
0