summaryrefslogtreecommitdiff
path: root/Lib/test/test_array.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_array.py')
-rwxr-xr-xLib/test/test_array.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 8b934fc75b..b0242762c7 100755
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -1069,6 +1069,12 @@ class UnicodeTest(StringTest, unittest.TestCase):
self.assertRaises(TypeError, a.fromunicode)
+ def test_issue17223(self):
+ # this used to crash
+ a = array.array('u', b'\xff' * 4)
+ self.assertRaises(ValueError, a.tounicode)
+ self.assertRaises(ValueError, str, a)
+
class NumberTest(BaseTest):
def test_extslice(self):