Fix the webp test, prevent temporary file from entering the package

This commit is contained in:
Sandro Mani 2013-03-22 02:19:09 +01:00
parent 68e0c58e4a
commit e43050c018
3 changed files with 30 additions and 0 deletions

View File

@ -30,6 +30,10 @@ Source0: https://github.com/python-imaging/Pillow/tarball/%{commit}/pytho
# Add s390* and ppc* archs
Patch0: python-pillow-archs.patch
# The shipped lena_webp_wrote.ppm is wrong
Patch1: python-pillow_webp-test.patch
# Prevent a temporary file from entering the package
Patch2: python-pillow_tempfile.patch
BuildRequires: python2-devel
BuildRequires: python-setuptools
@ -165,6 +169,8 @@ Tk interface for %{name3}.
%prep
%setup -q -n python-imaging-Pillow-%{shortcommit}
%patch0 -p1 -b .archs
%patch1 -p1 -b .lena
%patch2 -p1 -b .tempfile
%if %{with_python3}
# Create Python 3 source tree
@ -314,6 +320,7 @@ popd
* Fri Mar 22 2013 Sandro Mani <manisandro@gmail.com> - 2.0.0-2.git2e88848
- Update to latest git
- Remove python-pillow-disable-test.patch, gcc is now fixed
- Add python-pillow_tempfile.patch to prevent a temporary file from getting packaged
* Tue Mar 19 2013 Sandro Mani <manisandro@gmail.com> - 2.0.0-1.git2f4207c
- Update to 2.0.0 git snapshot

View File

@ -0,0 +1,12 @@
diff -rupN python-imaging-Pillow-2e88848/Tests/test_file_tiff.py python-imaging-Pillow-2e88848-new/Tests/test_file_tiff.py
--- python-imaging-Pillow-2e88848/Tests/test_file_tiff.py 2013-03-21 21:22:46.000000000 +0100
+++ python-imaging-Pillow-2e88848-new/Tests/test_file_tiff.py 2013-03-22 01:42:06.912892607 +0100
@@ -126,7 +126,7 @@ def test_g4_write():
file = "Tests/images/lena_g4_500.tif"
orig = Image.open(file)
- out = "temp.tif"
+ out = tempfile("temp.tif")
rot = orig.transpose(Image.ROTATE_90)
assert_equal(rot.size,(500,500))
rot.save(out)

File diff suppressed because one or more lines are too long