From c73ffbd7da4948e8356839a86315da69cf1f6368 Mon Sep 17 00:00:00 2001 From: Jonathan Heathcote Date: Fri, 17 Nov 2023 16:17:34 +0000 Subject: [PATCH] Cope with differing floating point arithmetic I suspect Qt is using single precision floats whilst I'm using double precision. --- tests/test_outline_painter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_outline_painter.py b/tests/test_outline_painter.py index 31c1f9c..6d6850b 100644 --- a/tests/test_outline_painter.py +++ b/tests/test_outline_painter.py @@ -323,7 +323,7 @@ def test_colours(self, p, opd): ((1.0, 0.0, 0.0, 1.0), 0.1, [(0.0, 0.0), (1.0, 0.0)]), ((0.0, 1.0, 0.0, 1.0), 0.1, [(0.0, 1.0), (1.0, 1.0)]), ((0.0, 0.0, 1.0, 1.0), 0.1, [(0.0, 2.0), (1.0, 2.0)]), - ((0.0, 0.0, 0.0, 128/255.), 0.1, [(0.0, 3.0), (1.0, 3.0)]), + ((0.0, 0.0, 0.0, pytest.approx(128/255.)), 0.1, [(0.0, 3.0), (1.0, 3.0)]), (None, 0.1, [(0.0, 4.0), (1.0, 4.0)]), ]