Package: pillow
Version: 2.2.1-3
Severity: serious
Tags: patch
User: [email protected]
Usertags: origin-ubuntu trusty ubuntu-patch
Hi doko,
The autopkgtest fails with the new webp. I think that you need to use
the same webp versions to generate and read the image for
assert_image_equal to work.
I've added support for using a just-built webp file and made the
autopkgtest use it. You might want to do something different.
* Support a webp file in $ADTTMP in the testsuite, and generate it in the
autopktests.
Thanks for considering the patch.
-- System Information:
Debian Release: jessie/sid
APT prefers trusty-updates
APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500,
'trusty-proposed'), (500, 'trusty')
Architecture: amd64 (x86_64)
Kernel: Linux 3.13.0-4-generic (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru pillow-2.2.1/debian/patches/generate-webp-file pillow-2.2.1/debian/patches/generate-webp-file
--- pillow-2.2.1/debian/patches/generate-webp-file 1970-01-01 01:00:00.000000000 +0100
+++ pillow-2.2.1/debian/patches/generate-webp-file 2014-01-21 11:36:07.000000000 +0000
@@ -0,0 +1,24 @@
+Index: b/Tests/test_file_webp.py
+===================================================================
+--- a/Tests/test_file_webp.py
++++ b/Tests/test_file_webp.py
+@@ -1,6 +1,7 @@
+ from tester import *
+
+ from PIL import Image
++import os
+
+ try:
+ from PIL import _webp
+@@ -27,7 +28,11 @@
+ assert_no_exception(lambda: image.getdata())
+
+ # generated with: dwebp -ppm ../../Images/lena.webp -o lena_webp_bits.ppm
+- target = Image.open('Tests/images/lena_webp_bits.ppm')
++ if 'ADTTMP' in os.environ:
++ target = Image.open(os.path.join(os.environ['ADTTMP'], 'lena_webp.ppm'))
++ else:
++ target = Image.open('Tests/images/lena_webp_bits.ppm')
++
+ assert_image_equal(image, target)
+
diff -Nru pillow-2.2.1/debian/patches/series pillow-2.2.1/debian/patches/series
--- pillow-2.2.1/debian/patches/series 2013-12-16 12:02:17.000000000 +0000
+++ pillow-2.2.1/debian/patches/series 2014-01-20 17:48:59.000000000 +0000
@@ -2,3 +2,4 @@
toplevel-setup.py
freetype-includes.diff
lcms2.diff
+generate-webp-file
diff -Nru pillow-2.2.1/debian/tests/control pillow-2.2.1/debian/tests/control
--- pillow-2.2.1/debian/tests/control 2013-12-16 11:52:16.000000000 +0000
+++ pillow-2.2.1/debian/tests/control 2014-01-21 11:12:11.000000000 +0000
@@ -2,4 +2,4 @@
Depends: @
Tests: upstream-py2 upstream-py3
-Depends: @
+Depends: @, webp
diff -Nru pillow-2.2.1/debian/tests/upstream-py2 pillow-2.2.1/debian/tests/upstream-py2
--- pillow-2.2.1/debian/tests/upstream-py2 2013-12-16 11:52:16.000000000 +0000
+++ pillow-2.2.1/debian/tests/upstream-py2 2014-01-21 11:56:05.000000000 +0000
@@ -1,4 +1,5 @@
#!/bin/sh
set -e
+dwebp -ppm Images/lena.webp -o $ADTTMP/lena_webp.ppm 2>&1
python Tests/run.py --installed
diff -Nru pillow-2.2.1/debian/tests/upstream-py3 pillow-2.2.1/debian/tests/upstream-py3
--- pillow-2.2.1/debian/tests/upstream-py3 2013-12-16 11:52:16.000000000 +0000
+++ pillow-2.2.1/debian/tests/upstream-py3 2014-01-21 11:56:10.000000000 +0000
@@ -1,4 +1,5 @@
#!/bin/sh
set -e
+dwebp -ppm Images/lena.webp -o $ADTTMP/lena_webp.ppm 2>&1
python3 Tests/run.py --installed