From e22643e2abe1452f77b6d1ca2e27d2e44162feed Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Tue, 20 Jul 2010 08:52:22 -0300 Subject: Adding deepcopy test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer: Renato Araújo Luciano Wolf --- tests/samplebinding/copy_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/samplebinding/copy_test.py b/tests/samplebinding/copy_test.py index 6f761784a..3a0ff1876 100644 --- a/tests/samplebinding/copy_test.py +++ b/tests/samplebinding/copy_test.py @@ -43,6 +43,18 @@ class SimpleCopy(unittest.TestCase): self.assertEqual(point, new_point) +class DeepCopy(unittest.TestCase): + '''Deep copy with shiboken objects''' + + def testDeepCopy(self): + '''Deep copy of value types''' + point = Point(3.1, 4.2) + new_point = copy.deepcopy([point])[0] + + self.assert_(point is not new_point) + self.assertEqual(point, new_point) + + if __name__ == '__main__': unittest.main() -- cgit v1.2.3