diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-04-03 00:13:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-04-03 00:13:06 +0200 |
commit | 2a0d5de5a9decd785b22dafa69aae5320231f1b7 (patch) | |
tree | 6c532e278025fb46a94f4cb3c3a68063b7011fe1 /gnu/packages/patches/python-pillow-freetype-2.7-test-failure.patch | |
parent | 41f6d18fb6ae7adebe72793c625ad4574991fa6d (diff) | |
parent | 245575eaf33801753ac8290e077c4397b2568540 (diff) | |
download | guix-patches-2a0d5de5a9decd785b22dafa69aae5320231f1b7.tar guix-patches-2a0d5de5a9decd785b22dafa69aae5320231f1b7.tar.gz |
Merge branch 'core-updates'
Diffstat (limited to 'gnu/packages/patches/python-pillow-freetype-2.7-test-failure.patch')
-rw-r--r-- | gnu/packages/patches/python-pillow-freetype-2.7-test-failure.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-pillow-freetype-2.7-test-failure.patch b/gnu/packages/patches/python-pillow-freetype-2.7-test-failure.patch new file mode 100644 index 0000000000..18bc30bc79 --- /dev/null +++ b/gnu/packages/patches/python-pillow-freetype-2.7-test-failure.patch @@ -0,0 +1,75 @@ +Fix some test failures when building with freetype-2.7. + +https://github.com/python-pillow/Pillow/issues/2116 +https://github.com/python-pillow/Pillow/pull/2286 + +Patch copied from upstream source repository: + +https://github.com/python-pillow/Pillow/commit/acf68c835c93ba144f83198306aa7e6082a43f43 + +From acf68c835c93ba144f83198306aa7e6082a43f43 Mon Sep 17 00:00:00 2001 +From: hugovk <hugovk@users.noreply.github.com> +Date: Mon, 12 Dec 2016 15:16:43 +0200 +Subject: [PATCH] Increase epsilon for FreeType 2.7 + +--- + Tests/test_imagefont.py | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py +index de89ac92..5207dce3 100644 +--- a/Tests/test_imagefont.py ++++ b/Tests/test_imagefont.py +@@ -125,7 +125,9 @@ try: + + target = 'Tests/images/rectangle_surrounding_text.png' + target_img = Image.open(target) +- self.assert_image_similar(im, target_img, .5) ++ ++ # Epsilon ~.5 fails with FreeType 2.7 ++ self.assert_image_similar(im, target_img, 2.5) + + def test_render_multiline(self): + im = Image.new(mode='RGB', size=(300, 100)) +@@ -144,7 +146,7 @@ try: + # some versions of freetype have different horizontal spacing. + # setting a tight epsilon, I'm showing the original test failure + # at epsilon = ~38. +- self.assert_image_similar(im, target_img, .5) ++ self.assert_image_similar(im, target_img, 6.2) + + def test_render_multiline_text(self): + ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE) +@@ -158,7 +160,8 @@ try: + target = 'Tests/images/multiline_text.png' + target_img = Image.open(target) + +- self.assert_image_similar(im, target_img, .5) ++ # Epsilon ~.5 fails with FreeType 2.7 ++ self.assert_image_similar(im, target_img, 6.2) + + # Test that text() can pass on additional arguments + # to multiline_text() +@@ -178,7 +181,8 @@ try: + target = 'Tests/images/multiline_text'+ext+'.png' + target_img = Image.open(target) + +- self.assert_image_similar(im, target_img, .5) ++ # Epsilon ~.5 fails with FreeType 2.7 ++ self.assert_image_similar(im, target_img, 6.2) + + def test_unknown_align(self): + im = Image.new(mode='RGB', size=(300, 100)) +@@ -227,7 +231,8 @@ try: + target = 'Tests/images/multiline_text_spacing.png' + target_img = Image.open(target) + +- self.assert_image_similar(im, target_img, .5) ++ # Epsilon ~.5 fails with FreeType 2.7 ++ self.assert_image_similar(im, target_img, 6.2) + + def test_rotated_transposed_font(self): + img_grey = Image.new("L", (100, 100)) +-- +2.12.0 + |