From 12cb5458cf5c26080158ecbee010ae9073a907e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sun, 4 Oct 2020 21:19:36 +0200 Subject: [PATCH] Check HSV values in image test --- unittests/test_image.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unittests/test_image.py b/unittests/test_image.py index 767b36a7..a1dc0d7d 100644 --- a/unittests/test_image.py +++ b/unittests/test_image.py @@ -234,6 +234,9 @@ class image_Tests(wtc.WidgetTestCase): rgb = wx.Image.RGBValue(1,2,3) hsv = wx.Image.RGBtoHSV(rgb) rgb = wx.Image.HSVtoRGB(hsv) + self.assertAlmostEqual(hsv.value * 255.0, 3.0) + self.assertAlmostEqual(hsv.saturation* 255.0, 170.0) + self.assertAlmostEqual(hsv.hue * 360.0, 210.0) self.assertEqual(rgb.red, 1) self.assertEqual(rgb.green, 2) self.assertEqual(rgb.blue, 3) -- 2.28.0