aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrenato <renato.filho@openbossa.org>2010-05-31 16:08:19 -0300
committerrenato <renato.filho@openbossa.org>2010-05-31 16:08:39 -0300
commit1a235edc097e280ddee1d49ed836dbaa28399eb8 (patch)
treee929a7acb8e32df8ad12a4e507571bfbb81eb32a /tests
parent41a1aa59d160cfb5e8e7b14024880d99e04a0938 (diff)
Fix QColor test to avoid floating points.
Diffstat (limited to 'tests')
-rw-r--r--tests/qtgui/qcolor_test.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/qtgui/qcolor_test.py b/tests/qtgui/qcolor_test.py
index 7a23fb766..3a4932647 100644
--- a/tests/qtgui/qcolor_test.py
+++ b/tests/qtgui/qcolor_test.py
@@ -18,9 +18,8 @@ class QColorGetTest(unittest.TestCase):
self.assertEqual(self.color.getRgbF(), (20.0/255, 40.0/255, 60.0/255, 80.0/255))
def testGetHsl(self):
- hls = colorsys.rgb_to_hls(20.0/255, 40.0/255, 60.0/255)
- hsla = hls[0]*360.0, hls[2]*256, hls[1]*255, self.color.alpha()
- self.assertEqual(self.color.getHsl(), hsla)
+ hls = colorsys.rgb_to_hls(0.78, 0.15, 0.23)
+ self.assertEqual(self.color.getHsl(), (210, 127, 40, self.color.alpha()))
def testGetHslF(self):
hls = colorsys.rgb_to_hls(20.0/255, 40.0/255, 60.0/255)