From 2b0ebb0de243e2a1bbae28d69050076c90cd950f Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 15 May 2017 11:21:13 +0100 Subject: [PATCH] fix test suite thresholds changes in jpg encode/decode mean we must adjust test suite thresholds --- ChangeLog | 1 + test/test_foreign.py | 6 +++--- test/test_histogram.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 327f5ee2..b9db7479 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ - doc polishing - more improvements for truncated PNG files, thanks juyunsang - improve corrupted jpg handling, thanks juyunsang +- fix small test suite issues on os x 23/4/17 started 8.5.4 - don't depend on image width when setting n_lines, thanks kleisauke diff --git a/test/test_foreign.py b/test/test_foreign.py index 364076a5..cb787312 100755 --- a/test/test_foreign.py +++ b/test/test_foreign.py @@ -169,7 +169,7 @@ class TestForeign(unittest.TestCase): self.file_loader("jpegload", self.jpeg_file, jpeg_valid) self.buffer_loader("jpegload_buffer", self.jpeg_file, jpeg_valid) self.save_load_buffer("jpegsave_buffer", "jpegload_buffer", self.colour, - 60) + 80) self.save_load("%s.jpg", self.mono) self.save_load("%s.jpg", self.colour) @@ -264,9 +264,9 @@ class TestForeign(unittest.TestCase): self.save_load_file("test-5.tif", "[tile]", self.colour, 0) self.save_load_file("test-6.tif", "[tile,pyramid]", self.colour, 0) self.save_load_file("test-7.tif", - "[tile,pyramid,compression=jpeg]", self.colour, 60) + "[tile,pyramid,compression=jpeg]", self.colour, 80) self.save_load_file("test-8.tif", "[bigtiff]", self.colour, 0) - self.save_load_file("test-9.tif", "[compression=jpeg]", self.colour, 60) + self.save_load_file("test-9.tif", "[compression=jpeg]", self.colour, 80) self.save_load_file("test-10.tif", "[tile,tile-width=256]", self.colour, 10) diff --git a/test/test_histogram.py b/test/test_histogram.py index 43a32cba..9b472022 100755 --- a/test/test_histogram.py +++ b/test/test_histogram.py @@ -127,7 +127,7 @@ class TestHistogram(unittest.TestCase): ent = im.hist_find().hist_entropy() - self.assertAlmostEqual(ent, 4.367, places = 3) + self.assertAlmostEqual(ent, 4.37, places = 2) def test_stdif(self): im = Vips.Image.new_from_file("images/йцук.jpg")