diff options
Diffstat (limited to 'tests/QtGui/qcolor_test.py')
-rw-r--r-- | tests/QtGui/qcolor_test.py | 15 |
1 files changed, 15 insertions, 0 deletions
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() |