8000 gh-99266: ctypes: Preserve a more detailed exception in _SimpleCData.from_param by kamilturek · Pull Request #99760 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-99266: ctypes: Preserve a more detailed exception in _SimpleCData.from_param #99760

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
merged 15 commits into from
Jan 21, 2023
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
Remove whitespaces
  • Loading branch information
kamilturek committed Jan 20, 2023
commit 85929f943cfa2470c62e4ab746c48d416f782e44
2 changes: 1 addition & 1 deletion Lib/test/test_ctypes/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def callback(*args):

with self.assertRaises(ArgumentError) as cm:
callback(b"abc")

self.assertEqual(str(cm.exception),
"argument 1: TypeError: one character bytes, "
"bytearray or integer expected")
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_ctypes/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def test_c_wchar(self):
c_wchar.from_param(123)
self.assertEqual(str(cm.exception),
"unicode string expected instead of int instance")


def test_int_pointers(self):
from ctypes import c_short, c_uint, c_int, c_long, POINTER, pointer
Expand Down
0