Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_array.py @ 72541:7fa098f6dc6a
array module uses the new Unicode API
* Use Py_UCS4* buffer instead of Py_UNICODE*
* Use "I" or "L" format, instead of "u" format
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Fri, 30 Sep 2011 00:51:10 +0200 |
| parents | 15659e0e2b2e |
| children | 98c0265cf7b9 |
line wrap: on
line diff
--- a/Lib/test/test_array.py Fri Sep 30 00:03:59 2011 +0200 +++ b/Lib/test/test_array.py Fri Sep 30 00:51:10 2011 +0200 @@ -218,10 +218,14 @@ self.assertEqual(bi[1], len(a)) def test_byteswap(self): - a = array.array(self.typecode, self.example) + if self.typecode == 'u': + example = '\U00100100' + else: + example = self.example + a = array.array(self.typecode, example) self.assertRaises(TypeError, a.byteswap, 42) if a.itemsize in (1, 2, 4, 8): - b = array.array(self.typecode, self.example) + b = array.array(self.typecode, example) b.byteswap() if a.itemsize==1: self.assertEqual(a, b)
