From 646850ee7b92b4c6d25de04583bcc52a4f122e1e Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Thu, 15 Jul 2010 09:38:40 -0300 Subject: Adding QColor copy test Reviewer: Luciano Wolf Renato Filho --- tests/QtGui/qcolor_test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/QtGui/qcolor_test.py b/tests/QtGui/qcolor_test.py index 3c2f11ba0..a636ad6c1 100644 --- a/tests/QtGui/qcolor_test.py +++ b/tests/QtGui/qcolor_test.py @@ -64,5 +64,20 @@ class QColorEqualGlobalColor(unittest.TestCase): self.assertEqual(QColor(255, 0, 0), Qt.red) +class QColorCopy(unittest.TestCase): + + def testDeepCopy(self): + '''QColor deepcopy''' + + from copy import deepcopy + + original = QColor(0, 0, 255) + copy = deepcopy([original])[0] + + self.assert_(original is not copy) + self.assertEqual(original, copy) + del original + self.assertEqual(copy, QColor(0, 0, 255)) + if __name__ == '__main__': unittest.main() -- cgit v1.2.3