summaryrefslogtreecommitdiff
path: root/Lib/test/test_array.py
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-12-29 14:42:17 +0000
committerThomas Wouters <thomas@python.org>2006-12-29 14:42:17 +0000
commit04e820443b78edebc986212e74291daba2480a12 (patch)
tree8f0da3f89ecca48c1764f543f1e4a8bbcd54d140 /Lib/test/test_array.py
parente38ecee5c3c6ea0f0eba2dfe49c110279626b5e0 (diff)
downloadcpython-git-04e820443b78edebc986212e74291daba2480a12.tar.gz
Backport trunk checkin r51565:
Fix SF bug #1545837: array.array borks on deepcopy. array.__deepcopy__() needs to take an argument, even if it doesn't actually use it.
Diffstat (limited to 'Lib/test/test_array.py')
-rwxr-xr-xLib/test/test_array.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 62361fce8c..06f13cd2b7 100755
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -85,6 +85,13 @@ class BaseTest(unittest.TestCase):
self.assertNotEqual(id(a), id(b))
self.assertEqual(a, b)
+ def test_deepcopy(self):
+ import copy
+ a = array.array(self.typecode, self.example)
+ b = copy.deepcopy(a)
+ self.assertNotEqual(id(a), id(b))
+ self.assertEqual(a, b)
+
def test_pickle(self):
for protocol in (0, 1, 2):
a = array.array(self.typecode, self.example)