summaryrefslogtreecommitdiff
path: root/Lib/test/test_array.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_array.py')
-rw-r--r--Lib/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 11184add6d..b18467fb88 100644
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -41,6 +41,12 @@ class MiscTest(unittest.TestCase):
self.assertRaises(ValueError, array.array, 'x')
@support.cpython_only
+ def test_disallow_instantiation(self):
+ # Ensure that the type disallows instantiation (bpo-43916)
+ tp = type(iter(array.array('I')))
+ self.assertRaises(TypeError, tp)
+
+ @support.cpython_only
def test_immutable(self):
# bpo-43908: check that array.array is immutable
with self.assertRaises(TypeError):