Use tester.py's built-in coverage and coverage.py's built-in cleanup

This commit is contained in:
hugovk 2014-04-08 12:28:00 +03:00
parent e4b8cdac4c
commit 3e9cde4412
2 changed files with 2 additions and 9 deletions

View File

@ -30,7 +30,7 @@ script:
- python setup.py clean
- python setup.py build_ext --inplace
- coverage run --append --include=PIL/* selftest.py
- coverage run --append --include=PIL/* Tests/run.py
- python Tests/run.py --coverage
after_success:
- coverage report

View File

@ -83,7 +83,7 @@ def assert_deep_equal(a, b, msg=None):
else:
failure(msg or "got %s, expected %s" % (a,b))
else:
failure(msg or "got length %s, expected %s" % (len(a), len(b)))
failure(msg or "got length %s, expected %s" % (len(a), len(b)))
except:
assert_equal(a,b,msg)
@ -285,13 +285,6 @@ def _setup():
except OSError:
pass
if "--coverage" in sys.argv:
import coverage
coverage.stop()
# The coverage module messes up when used from inside an
# atexit handler. Do an explicit save to make sure that
# we actually flush the coverage cache.
coverage.the_coverage.save()
import atexit, sys
atexit.register(report)
if "--coverage" in sys.argv: