From c2094fcd7c89097a2b8042d139b417ec5db0c006 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 24 Apr 2020 19:26:17 +0100 Subject: [PATCH] relax thresh for jpegload some lib jpegs have slightly different rounding behaviour --- test/test-suite/test_foreign.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-suite/test_foreign.py b/test/test-suite/test_foreign.py index b70dd68d..d52cff6d 100644 --- a/test/test-suite/test_foreign.py +++ b/test/test-suite/test_foreign.py @@ -132,7 +132,9 @@ class TestForeign: def test_jpeg(self): def jpeg_valid(im): a = im(10, 10) - assert_almost_equal_objects(a, [141, 127, 90]) + # different versions of libjpeg decode have slightly different + # rounding + assert_almost_equal_objects(a, [141, 127, 90], threshold=3) profile = im.get("icc-profile-data") assert len(profile) == 564 assert im.width == 290