diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-07-20 08:52:22 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:07:21 -0300 |
commit | e22643e2abe1452f77b6d1ca2e27d2e44162feed (patch) | |
tree | b73f51c9c694add8e8c8e75717609474b3db81a4 | |
parent | 4b80e2ef898194ed9d7c2989dd4d9fe82453aeb1 (diff) |
Adding deepcopy test.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r-- | tests/samplebinding/copy_test.py | 12 |
1 files changed, 12 insertions, 0 deletions
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() |