Merge from master

This commit is contained in:
wiredfool 2014-04-14 06:47:42 -07:00
commit ac35b29f6e
4 changed files with 38 additions and 12 deletions

View File

@ -5,8 +5,9 @@ Pillow
Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors.
.. image:: https://travis-ci.org/python-imaging/Pillow.png
.. image:: https://travis-ci.org/python-imaging/Pillow.svg?branch=master
:target: https://travis-ci.org/python-imaging/Pillow
:alt: Travis CI build status
.. image:: https://pypip.in/v/Pillow/badge.png
:target: https://pypi.python.org/pypi/Pillow/
@ -16,4 +17,7 @@ Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the Pyt
:target: https://pypi.python.org/pypi/Pillow/
:alt: Number of PyPI downloads
.. image:: https://coveralls.io/repos/python-imaging/Pillow/badge.png?branch=master
:target: https://coveralls.io/r/python-imaging/Pillow?branch=master
The documentation is hosted at http://pillow.readthedocs.org/. It contains installation instructions, tutorials, reference, compatibility details, and more.

View File

@ -2,8 +2,14 @@ from __future__ import print_function
# minimal test runner
import glob, os, os.path, sys, tempfile, re
from multiprocessing import Pool
import glob
import os
import os.path
import re
import sys
import tempfile
try:
root = os.path.dirname(__file__)
@ -18,6 +24,11 @@ if not os.path.isfile("PIL/Image.py"):
python_options = []
tester_options = []
include = [x for x in sys.argv[1:] if x[:2] != "--"]
skipped = []
failed = []
python_options = " ".join(python_options)
tester_options = " ".join(tester_options)
ignore_re = re.compile('^ignore: (.*)$', re.MULTILINE)
@ -115,12 +126,13 @@ def main():
# if there's an ok at the end, it's not really ok
result = result[:-3]
print(result)
failure = failure + 1
failed.append(test)
else:
success = success + 1
print("-"*68)
#UNDONE -- this is wrong
temp_root = os.path.join(tempfile.gettempdir(), 'pillow-tests')
tempfiles = glob.glob(os.path.join(temp_root, "temp_*"))
if tempfiles:
@ -137,9 +149,11 @@ def main():
if skipped:
print("---", tests(len(skipped)), "skipped.")
print(skipped)
if failure:
print("***", tests(failure), "of", (success + failure), "failed.")
print(", ".join(skipped))
if failed:
failure = len(failed)
print("***", tests(failure), "of", (success + failure), "failed:")
print(", ".join(failed))
sys.exit(1)
else:
print(tests(success), "passed.")
@ -148,3 +162,4 @@ def main():
if __name__=='__main__':
sys.exit(main())

View File

@ -2,6 +2,7 @@ from tester import *
from PIL import Image
def verify(im1):
im2 = lena("I")
assert_equal(im1.size, im2.size)
@ -18,6 +19,7 @@ def verify(im1):
return
success()
def test_basic():
# PIL 1.1 has limited support for 16-bit image data. Check that
# create/copy/transform and save works as expected.
@ -30,10 +32,10 @@ def test_basic():
w, h = imIn.size
imOut = imIn.copy()
verify(imOut) # copy
verify(imOut) # copy
imOut = imIn.transform((w, h), Image.EXTENT, (0, 0, w, h))
verify(imOut) # transform
verify(imOut) # transform
filename = tempfile("temp.im")
imIn.save(filename)

View File

@ -4,8 +4,9 @@ Pillow
Pillow is the 'friendly' PIL fork by Alex Clark and Contributors. PIL is the
Python Imaging Library by Fredrik Lundh and Contributors.
.. image:: https://travis-ci.org/python-imaging/Pillow.png
.. image:: https://travis-ci.org/python-imaging/Pillow.svg?branch=master
:target: https://travis-ci.org/python-imaging/Pillow
:alt: Travis CI build status
.. image:: https://pypip.in/v/Pillow/badge.png
:target: https://pypi.python.org/pypi/Pillow/
@ -15,6 +16,10 @@ Python Imaging Library by Fredrik Lundh and Contributors.
:target: https://pypi.python.org/pypi/Pillow/
:alt: Number of PyPI downloads
.. image:: https://coveralls.io/repos/python-imaging/Pillow/badge.png?branch=master
:target: https://coveralls.io/r/python-imaging/Pillow?branch=master
:alt: Test coverage
To start using Pillow, please read the :doc:`installation
instructions <installation>`.