Start coverage measurement earlier so tests are properly covered

This commit is contained in:
hugovk 2014-04-08 17:20:52 +03:00
parent 5afdd6cb54
commit 9210f88102

View File

@ -299,6 +299,12 @@ def ignore(pattern):
def _setup():
global _logfile
import sys
if "--coverage" in sys.argv:
import coverage
cov = coverage.coverage(auto_data=True, include="PIL/*")
cov.start()
def report():
if run:
run()
@ -320,12 +326,8 @@ def _setup():
pass
import atexit
import sys
atexit.register(report)
if "--coverage" in sys.argv:
import coverage
cov = coverage.coverage(auto_data=True, include="PIL/*")
cov .start()
if "--log" in sys.argv:
_logfile = open("test.log", "a")