summaryrefslogtreecommitdiff
path: root/Lib/ctypes
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-06 01:58:24 -0800
committerGitHub <noreply@github.com>2018-12-06 01:58:24 -0800
commitf740818f3d92497c564d515a661039dc8434fc6c (patch)
treea6f66e989874351f8bfc760ca3bf98fd302336a3 /Lib/ctypes
parentde8037db8c203ca0a1bf549f690230d5e7b8429e (diff)
downloadcpython-git-f740818f3d92497c564d515a661039dc8434fc6c.tar.gz
bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii character. (GH-10863)
(cherry picked from commit 3ffa8b9ba190101f674a0e524e482a83ed09cccd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/ctypes')
-rw-r--r--Lib/ctypes/test/test_bytes.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/ctypes/test/test_bytes.py b/Lib/ctypes/test/test_bytes.py
index 20fa056503..092ec5af05 100644
--- a/Lib/ctypes/test/test_bytes.py
+++ b/Lib/ctypes/test/test_bytes.py
@@ -12,6 +12,7 @@ class BytesTest(unittest.TestCase):
x.value = "y"
c_char.from_param(b"x")
self.assertRaises(TypeError, c_char.from_param, "x")
+ self.assertIn('xbd', repr(c_char.from_param(b"\xbd")))
(c_char * 3)(b"a", b"b", b"c")
self.assertRaises(TypeError, c_char * 3, "a", "b", "c")