Fixed the array module in unicode disabled build (regression of issue20014).
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 7256b94..105cf73 100644
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -18,7 +18,9 @@
array.array.__init__(self, typecode)
tests = [] # list to accumulate all tests
-typecodes = "cubBhHiIlLfd"
+typecodes = "cbBhHiIlLfd"
+if test_support.have_unicode:
+ typecodes += "u"
class BadConstructorTest(unittest.TestCase):
@@ -837,6 +839,7 @@
self.assertEqual(s.color, "red")
self.assertEqual(s.__dict__.keys(), ["color"])
+ @test_support.requires_unicode
def test_nounicode(self):
a = array.array(self.typecode, self.example)
self.assertRaises(ValueError, a.fromunicode, unicode(''))