diff --git a/.travis.yml b/.travis.yml index 4a2250771..7e4e5e9c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,13 +30,13 @@ script: # Don't cover PyPy: it fails intermittently and is x5.8 slower (#640) - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then python selftest.py; fi - - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then python Tests/run.py; fi - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then nosetests test/; fi + - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then python Tests/run.py; fi # Cover the others - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then coverage run --append --include=PIL/* selftest.py; fi - - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then python Tests/run.py --coverage; fi - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then coverage run --append --include=PIL/* -m nose test/; fi + - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then python Tests/run.py --coverage; fi after_success: diff --git a/test/test_image_load.py b/test/test_image_load.py index 80f505e6c..2001c233a 100644 --- a/test/test_image_load.py +++ b/test/test_image_load.py @@ -18,8 +18,8 @@ class TestImageLoad(PillowTestCase): def test_close(self): im = Image.open("Images/lena.gif") im.close() - self.assert_exception(ValueError, lambda: im.load()) - self.assert_exception(ValueError, lambda: im.getpixel((0, 0))) + self.assertRaises(ValueError, lambda: im.load()) + self.assertRaises(ValueError, lambda: im.getpixel((0, 0))) def test_contextmanager(self): fn = None @@ -27,7 +27,7 @@ class TestImageLoad(PillowTestCase): fn = im.fp.fileno() os.fstat(fn) - self.assert_exception(OSError, lambda: os.fstat(fn)) + self.assertRaises(OSError, lambda: os.fstat(fn)) if __name__ == '__main__': unittest.main()