Kaydet (Commit) bded28c0 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #13072: Ooops, now fix test_array for Linux with 32-bit wchar_t...

üst 8d4734f6
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
Roger E. Masse Roger E. Masse
""" """
import ctypes
import unittest import unittest
from test import support from test import support
import weakref import weakref
...@@ -1041,7 +1042,7 @@ class UnicodeTest(StringTest): ...@@ -1041,7 +1042,7 @@ class UnicodeTest(StringTest):
a.fromunicode('\x11abc\xff\u1234') a.fromunicode('\x11abc\xff\u1234')
s = a.tounicode() s = a.tounicode()
self.assertEqual(s, '\xa0\xc2\u1234 \x11abc\xff\u1234') self.assertEqual(s, '\xa0\xc2\u1234 \x11abc\xff\u1234')
self.assertEqual(a.itemsize, 2) self.assertEqual(a.itemsize, ctypes.sizeof(ctypes.c_wchar))
s = '\x00="\'a\\b\x80\xff\u0000\u0001\u1234' s = '\x00="\'a\\b\x80\xff\u0000\u0001\u1234'
a = array.array('u', s) a = array.array('u', s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment