diff options
Diffstat (limited to 'Lib/test')
-rwxr-xr-x | Lib/test/test_array.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 604dcdf..fc17b42 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -218,10 +218,14 @@ class BaseTest(unittest.TestCase): 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) |