diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-02-26 20:38:59 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-03 16:15:00 -0300 |
commit | 7256827c898d11be2cbf43566bac348f0395f2e8 (patch) | |
tree | 84261b211fb7b2faa0c969dae77b8b813501ac9d /tests | |
parent | 8bc7aa50c6e875461787ce9c6b5e2edb01de78bc (diff) |
Adding test for QColor(QRgb)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtgui/qcolor_test.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/qtgui/qcolor_test.py b/tests/qtgui/qcolor_test.py index 6a02ef49c..91ef3225e 100644 --- a/tests/qtgui/qcolor_test.py +++ b/tests/qtgui/qcolor_test.py @@ -2,6 +2,7 @@ import unittest import colorsys +from PySide.QtCore import Qt from PySide.QtGui import QColor @@ -45,5 +46,18 @@ class QColorGetTest(unittest.TestCase): self.assert_(x - y < 1/10000.0) +class QColorQRgbConstructor(unittest.TestCase): + '''QColor(QRgb) constructor''' + # Affected by bug #170 - QColor(QVariant) coming before QColor(uint) + # in overload sorting + + def testBasic(self): + '''QColor(QRgb)''' + color = QColor(255, 0, 0) + #QRgb format #AARRGGBB + rgb = 0x00FF0000 + self.assertEqual(QColor(rgb), color) + + if __name__ == '__main__': unittest.main() |