mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +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():
|
def _setup():
|
||||||
global _logfile
|
global _logfile
|
||||||
|
|
||||||
|
import sys
|
||||||
|
if "--coverage" in sys.argv:
|
||||||
|
import coverage
|
||||||
|
cov = coverage.coverage(auto_data=True, include="PIL/*")
|
||||||
|
cov.start()
|
||||||
|
|
||||||
def report():
|
def report():
|
||||||
if run:
|
if run:
|
||||||
run()
|
run()
|
||||||
|
@ -320,12 +326,8 @@ def _setup():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
import atexit
|
import atexit
|
||||||
import sys
|
|
||||||
atexit.register(report)
|
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:
|
if "--log" in sys.argv:
|
||||||
_logfile = open("test.log", "a")
|
_logfile = open("test.log", "a")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user