diff options
author | Thomas Wouters <thomas@python.org> | 2006-08-24 18:40:20 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-08-24 18:40:20 (GMT) |
commit | 9e398cac94cd15385e79d70e3575fd2945e0b76d (patch) | |
tree | 2e362d842714d0b4cdee0775116bb6ab2180b09d /Lib/test/test_array.py | |
parent | 348dc88097412cc229254f20f2759ce4cd192261 (diff) | |
download | cpython-9e398cac94cd15385e79d70e3575fd2945e0b76d.zip cpython-9e398cac94cd15385e79d70e3575fd2945e0b76d.tar.gz cpython-9e398cac94cd15385e79d70e3575fd2945e0b76d.tar.bz2 |
Fix SF bug #1545837: array.array borks on deepcopy.
array.__deepcopy__() needs to take an argument, even if it doesn't actually
use it. Will backport to 2.5 and 2.4 (if applicable.)
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 62361fc..06f13cd 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) |