diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-30 15:37:13 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-30 15:37:13 (GMT) |
| commit | 78122c9c5d9a24bdc7083d9bd8e78a072ede2f42 (patch) | |
| tree | 88f59d4e74e7f5fd0c171ae66f617278735ff39a /Lib/test/test_copy.py | |
| parent | b4ce1fc31be5614d527d77c55018281ebbcd70ab (diff) | |
| parent | b63015b01a07c535ef4c26fe0bc4c336295dd08e (diff) | |
| download | cpython-78122c9c5d9a24bdc7083d9bd8e78a072ede2f42.zip cpython-78122c9c5d9a24bdc7083d9bd8e78a072ede2f42.tar.gz cpython-78122c9c5d9a24bdc7083d9bd8e78a072ede2f42.tar.bz2 | |
Issue #25718: Fixed copying object with state with boolean value is false.
Diffstat (limited to 'Lib/test/test_copy.py')
| -rw-r--r-- | Lib/test/test_copy.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py index b9eaddd..4107e8a 100644 --- a/Lib/test/test_copy.py +++ b/Lib/test/test_copy.py @@ -213,6 +213,9 @@ class TestCopy(unittest.TestCase): return self.foo == other.foo x = C(42) self.assertEqual(copy.copy(x), x) + # State with boolean value is false (issue #25718) + x = C(0.0) + self.assertEqual(copy.copy(x), x) # The deepcopy() method @@ -517,6 +520,12 @@ class TestCopy(unittest.TestCase): self.assertEqual(y, x) self.assertIsNot(y, x) self.assertIsNot(y.foo, x.foo) + # State with boolean value is false (issue #25718) + x = C([]) + y = copy.deepcopy(x) + self.assertEqual(y, x) + self.assertIsNot(y, x) + self.assertIsNot(y.foo, x.foo) def test_deepcopy_reflexive_inst(self): class C: |
