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. 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 :target: https://travis-ci.org/python-imaging/Pillow
:alt: Travis CI build status
.. image:: https://pypip.in/v/Pillow/badge.png .. image:: https://pypip.in/v/Pillow/badge.png
:target: https://pypi.python.org/pypi/Pillow/ :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/ :target: https://pypi.python.org/pypi/Pillow/
:alt: Number of PyPI downloads :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. 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 # minimal test runner
import glob, os, os.path, sys, tempfile, re
from multiprocessing import Pool from multiprocessing import Pool
import glob
import os
import os.path
import re
import sys
import tempfile
try: try:
root = os.path.dirname(__file__) root = os.path.dirname(__file__)
@ -18,6 +24,11 @@ if not os.path.isfile("PIL/Image.py"):
python_options = [] python_options = []
tester_options = [] tester_options = []
include = [x for x in sys.argv[1:] if x[:2] != "--"] 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) 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 # if there's an ok at the end, it's not really ok
result = result[:-3] result = result[:-3]
print(result) print(result)
failure = failure + 1 failed.append(test)
else: else:
success = success + 1 success = success + 1
print("-"*68) print("-"*68)
#UNDONE -- this is wrong
temp_root = os.path.join(tempfile.gettempdir(), 'pillow-tests') temp_root = os.path.join(tempfile.gettempdir(), 'pillow-tests')
tempfiles = glob.glob(os.path.join(temp_root, "temp_*")) tempfiles = glob.glob(os.path.join(temp_root, "temp_*"))
if tempfiles: if tempfiles:
@ -137,9 +149,11 @@ def main():
if skipped: if skipped:
print("---", tests(len(skipped)), "skipped.") print("---", tests(len(skipped)), "skipped.")
print(skipped) print(", ".join(skipped))
if failure: if failed:
print("***", tests(failure), "of", (success + failure), "failed.") failure = len(failed)
print("***", tests(failure), "of", (success + failure), "failed:")
print(", ".join(failed))
sys.exit(1) sys.exit(1)
else: else:
print(tests(success), "passed.") print(tests(success), "passed.")
@ -148,3 +162,4 @@ def main():
if __name__=='__main__': if __name__=='__main__':
sys.exit(main()) sys.exit(main())

View File

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

View File

@ -4,8 +4,9 @@ Pillow
Pillow is the 'friendly' PIL fork by Alex Clark and Contributors. PIL is the Pillow is the 'friendly' PIL fork by Alex Clark and Contributors. PIL is the
Python Imaging Library by Fredrik Lundh and Contributors. 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 :target: https://travis-ci.org/python-imaging/Pillow
:alt: Travis CI build status
.. image:: https://pypip.in/v/Pillow/badge.png .. image:: https://pypip.in/v/Pillow/badge.png
:target: https://pypi.python.org/pypi/Pillow/ :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/ :target: https://pypi.python.org/pypi/Pillow/
:alt: Number of PyPI downloads :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 To start using Pillow, please read the :doc:`installation
instructions <installation>`. instructions <installation>`.