aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/qcolor_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/QtGui/qcolor_test.py b/tests/QtGui/qcolor_test.py
index 1a9472894..29b0d5dbb 100644
--- a/tests/QtGui/qcolor_test.py
+++ b/tests/QtGui/qcolor_test.py
@@ -1,6 +1,7 @@
import unittest
import colorsys
+import PySide
from PySide.QtCore import Qt, qFuzzyCompare
from PySide.QtGui import QColor
@@ -68,5 +69,16 @@ class QColorCopy(unittest.TestCase):
del original
self.assertEqual(copy, QColor(0, 0, 255))
+class QColorRepr(unittest.TestCase):
+ def testReprFunction(self):
+ c = QColor(100, 120, 200)
+ c2 = eval(c.__repr__())
+ self.assertEqual(c, c2)
+
+ def testStrFunction(self):
+ c = QColor('red')
+ c2 = eval(c.__str__())
+ self.assertEqual(c, c2)
+
if __name__ == '__main__':
unittest.main()