Skip to content

Commit 29c6746

Browse files
author
Erlend E. Aasland
committed
Add test
1 parent 0b0a496 commit 29c6746

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_array.py

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ def test_bad_constructor(self):
4040
self.assertRaises(TypeError, array.array, 'xx')
4141
self.assertRaises(ValueError, array.array, 'x')
4242

43+
@support.cpython_only
44+
def test_immutable(self):
45+
with self.assertRaises(TypeError):
46+
array.array.foo = 1
47+
4348
def test_empty(self):
4449
# Exercise code for handling zero-length arrays
4550
a = array.array('B')

0 commit comments

Comments
 (0)