mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Use tester.py's built-in coverage and coverage.py's built-in cleanup
This commit is contained in:
parent
e4b8cdac4c
commit
3e9cde4412
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user