summaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-07-20 08:52:22 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-11 19:22:37 -0300
commit6deb06937a34e7ef51098336e0541e543d51b8e0 (patch)
tree9febc3528c11cb31f9066c65741c71fc65bc3f65 /tests/samplebinding
parent4478a25b66729490e27460a7fa59ae9bceadd1fd (diff)
downloadshiboken-6deb06937a34e7ef51098336e0541e543d51b8e0.tar.gz
shiboken-6deb06937a34e7ef51098336e0541e543d51b8e0.tar.xz
shiboken-6deb06937a34e7ef51098336e0541e543d51b8e0.zip
Adding deepcopy test.
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/copy_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/samplebinding/copy_test.py b/tests/samplebinding/copy_test.py
index 6f761784..3a0ff187 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()