updated coverage to look for the coverage.rc file as setup.cfg in share/coverage and the print out htmlcov in share/coverage
This commit is contained in:
parent
eb66e2a1bf
commit
b92c025f75
1 changed files with 12 additions and 4 deletions
|
|
@ -124,10 +124,12 @@ def manage(args="", workingdir=None, prefix=None, suffix=None):
|
|||
|
||||
@task
|
||||
def coverage(args="help", workingdir=None, outputdir=None,
|
||||
report=True, html=True):
|
||||
coveragerc=False, report=True, html=True):
|
||||
"""
|
||||
helper method that uses the coverage package
|
||||
|
||||
coveragerc file is only locaterd in share/coverage/setup.cfg
|
||||
|
||||
TODO: test if coverage is installed and if it isn't give
|
||||
an error explaining the problem
|
||||
"""
|
||||
|
|
@ -143,13 +145,19 @@ def coverage(args="help", workingdir=None, outputdir=None,
|
|||
if html:
|
||||
suffix += "&& coverage html"
|
||||
|
||||
coveragepath = "{projectroot}/share/coverage".format(
|
||||
projectroot=configuration.paths.project.root,
|
||||
outputdir=outputdir)
|
||||
|
||||
if coveragerc:
|
||||
suffix += " --rcfile={coveragepath}/setup.cfg".format(
|
||||
coveragepath=coveragepath)
|
||||
|
||||
if outputdir:
|
||||
outputpath = outputdir
|
||||
|
||||
else:
|
||||
outputpath = "{projectroot}/share".format(
|
||||
projectroot=configuration.paths.project.root,
|
||||
outputdir=outputdir)
|
||||
outputpath = coveragepath
|
||||
|
||||
outputpath += "/htmlcov"
|
||||
suffix += " -d %s" % outputpath
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue