diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-08-22 14:32:58 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:46 -0300 |
commit | 3da60153c00c693454fe80f1b3420b872becc4dd (patch) | |
tree | d7338627cfd837b5609b205c9256d1643f04e08d | |
parent | 4fdc15ef7f11956e4f0bf34fce60f8aa0252eace (diff) |
Created unit test for __reduce__ of empty QColor.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Neto <lauro.neto@openbossa.org>
-rw-r--r-- | tests/QtGui/qcolor_test.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/QtGui/qcolor_test.py b/tests/QtGui/qcolor_test.py index 29b0d5dbb..26f3f4cf7 100644 --- a/tests/QtGui/qcolor_test.py +++ b/tests/QtGui/qcolor_test.py @@ -3,7 +3,7 @@ import unittest import colorsys import PySide -from PySide.QtCore import Qt, qFuzzyCompare +from PySide.QtCore import Qt from PySide.QtGui import QColor @@ -69,6 +69,17 @@ class QColorCopy(unittest.TestCase): del original self.assertEqual(copy, QColor(0, 0, 255)) + def testEmptyCopy(self): + from copy import deepcopy + + original = QColor() + copy = deepcopy([original])[0] + self.assert_(original is not copy) + self.assertEqual(original, copy) + del original + self.assertEqual(copy, QColor()) + + class QColorRepr(unittest.TestCase): def testReprFunction(self): c = QColor(100, 120, 200) |