diff options
author | Thomas Wouters <thomas@python.org> | 2006-12-29 14:42:17 +0000 |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-12-29 14:42:17 +0000 |
commit | 04e820443b78edebc986212e74291daba2480a12 (patch) | |
tree | 8f0da3f89ecca48c1764f543f1e4a8bbcd54d140 /Lib/test/test_array.py | |
parent | e38ecee5c3c6ea0f0eba2dfe49c110279626b5e0 (diff) | |
download | cpython-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-x | Lib/test/test_array.py | 7 |
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) |