SF bug #910986: copy.copy fails for array.array
Added support for the copy module.
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 0331280..c9b05c2 100755
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -73,6 +73,13 @@
b.byteswap()
self.assertEqual(a, b)
+ def test_copy(self):
+ import copy
+ a = array.array(self.typecode, self.example)
+ b = copy.copy(a)
+ self.assertNotEqual(id(a), id(b))
+ self.assertEqual(a, b)
+
def test_insert(self):
a = array.array(self.typecode, self.example)
a.insert(0, self.example[0])