diff --git a/.travis.yml b/.travis.yml index c9c1e75a1..942ee95c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,11 +33,11 @@ script: # Don't cover PyPy: it fails intermittently and is x5.8 slower (#640) - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then time python selftest.py; fi - - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then time nosetests Tests/test_*.py; fi + - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then time nosetests -v Tests/test_*.py; fi # Cover the others - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then time coverage run --append --include=PIL/* selftest.py; fi - - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then time coverage run --append --include=PIL/* -m nose Tests/test_*.py; fi + - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then time coverage run --append --include=PIL/* -m nose -v Tests/test_*.py; fi after_success: - coverage report diff --git a/Tests/helper.py b/Tests/helper.py index c00e105e4..64f29bd5d 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -19,6 +19,10 @@ class PillowTestCase(unittest.TestCase): # holds last result object passed to run method: self.currentResult = None + # Nicer output for --verbose + def __str__(self): + return self.__class__.__name__ + "." + self._testMethodName + def run(self, result=None): self.currentResult = result # remember result for use later unittest.TestCase.run(self, result) # call superclass run method diff --git a/Tests/test_image_tobytes.py b/Tests/test_image_tobytes.py index 3be9128c1..6dbf7d6f2 100644 --- a/Tests/test_image_tobytes.py +++ b/Tests/test_image_tobytes.py @@ -1,7 +1,7 @@ -from helper import unittest, lena +from helper import unittest, PillowTestCase, lena -class TestImageToBytes(unittest.TestCase): +class TestImageToBytes(PillowTestCase): def test_sanity(self): data = lena().tobytes() diff --git a/Tests/test_pyroma.py b/Tests/test_pyroma.py index c10156cc0..295ef1057 100644 --- a/Tests/test_pyroma.py +++ b/Tests/test_pyroma.py @@ -7,7 +7,7 @@ except ImportError: pass -class TestPyroma(unittest.TestCase): +class TestPyroma(PillowTestCase): def setUp(self): try: