mirror of
https://github.com/python/cpython.git
synced 2025-01-06 00:25:19 +08:00
Issue #13072: Fix test_array for Windows with 16-bit wchar_t
This commit is contained in:
parent
3277b35183
commit
8d4734f6b2
@ -1029,7 +1029,7 @@ class UnicodeTest(StringTest):
|
|||||||
smallerexample = '\x01\u263a\x00\ufefe'
|
smallerexample = '\x01\u263a\x00\ufefe'
|
||||||
biggerexample = '\x01\u263a\x01\ufeff'
|
biggerexample = '\x01\u263a\x01\ufeff'
|
||||||
outside = str('\x33')
|
outside = str('\x33')
|
||||||
minitemsize = 4
|
minitemsize = 2
|
||||||
|
|
||||||
def test_unicode(self):
|
def test_unicode(self):
|
||||||
self.assertRaises(TypeError, array.array, 'b', 'foo')
|
self.assertRaises(TypeError, array.array, 'b', 'foo')
|
||||||
@ -1041,7 +1041,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, 4)
|
self.assertEqual(a.itemsize, 2)
|
||||||
|
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user