mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 16:24:11 +03:00
Start coverage measurement earlier so tests are properly covered
This commit is contained in:
parent
5afdd6cb54
commit
9210f88102
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user