diff --git a/README.rst b/README.rst index 78a256c0d..277c5d01f 100644 --- a/README.rst +++ b/README.rst @@ -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. diff --git a/Tests/run.py b/Tests/run.py index b2129db5f..639df5d7a 100644 --- a/Tests/run.py +++ b/Tests/run.py @@ -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) @@ -44,7 +55,7 @@ def test_one(f): if not p.endswith('$'): p = p + '$' return p - + ignore_res = [re.compile(fix_re(p), re.MULTILINE) for p in ignore_pats] except: print('(bad ignore patterns %r)' % ignore_pats) @@ -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()) + diff --git a/Tests/test_mode_i16.py b/Tests/test_mode_i16.py index 4c1798509..782a26623 100644 --- a/Tests/test_mode_i16.py +++ b/Tests/test_mode_i16.py @@ -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) diff --git a/docs/index.rst b/docs/index.rst index a59cda115..25e9f6b73 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,11 +1,12 @@ -Pillow +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 `. @@ -48,7 +53,7 @@ Pillow is a volunteer effort led by Alex Clark. If you can't help with development please consider helping us financially. Your assistance would be very much appreciated! -.. note:: Contributors please add your name and donation preference here. +.. note:: Contributors please add your name and donation preference here. ======================================= ======================================= **Developer** **Preference**