diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-07-15 09:38:40 -0300 |
---|---|---|
committer | renatofilho <renato.filho@openbossa.org> | 2010-10-13 13:39:52 -0300 |
commit | 646850ee7b92b4c6d25de04583bcc52a4f122e1e (patch) | |
tree | 9d55e7a9563c68c85df8631df6b5bfb763b85202 | |
parent | 9a3db9de9c67f1b38348ef64bcb730eec1d1e763 (diff) |
Adding QColor copy test
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Filho <renato.filho@openbossa.org>
-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() |