fixed bug in django.coverage that was caused because django.manage has to at least call on the test module when being used otherwise if I don't pass it anything it blows up
This commit is contained in:
parent
f740981bd5
commit
0063989ba5
1 changed files with 8 additions and 8 deletions
|
|
@ -123,7 +123,7 @@ def manage(args="help", workingdir=None, prefix="", suffix=""):
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def coverage(args="", workingdir=None, outputdir=None,
|
def coverage(args="test", workingdir=None, outputdir=None,
|
||||||
coveragerc=False, report=True, html=True):
|
coveragerc=False, report=True, html=True):
|
||||||
"""
|
"""
|
||||||
helper method that uses the coverage package
|
helper method that uses the coverage package
|
||||||
|
|
@ -139,20 +139,20 @@ def coverage(args="", workingdir=None, outputdir=None,
|
||||||
|
|
||||||
suffix = ""
|
suffix = ""
|
||||||
|
|
||||||
if report:
|
|
||||||
suffix += "&& coverage report"
|
|
||||||
|
|
||||||
if html:
|
|
||||||
suffix += "&& coverage html"
|
|
||||||
|
|
||||||
coveragepath = "{projectroot}/share/coverage".format(
|
coveragepath = "{projectroot}/share/coverage".format(
|
||||||
projectroot=configuration.paths.project.root,
|
projectroot=configuration.paths.project.root,
|
||||||
outputdir=outputdir)
|
outputdir=outputdir)
|
||||||
|
|
||||||
if coveragerc:
|
if coveragerc:
|
||||||
suffix += " --rcfile={coveragepath}/setup.cfg".format(
|
prefix += " --rcfile={coveragepath}/setup.cfg".format(
|
||||||
coveragepath=coveragepath)
|
coveragepath=coveragepath)
|
||||||
|
|
||||||
|
if report:
|
||||||
|
suffix += " && coverage report"
|
||||||
|
|
||||||
|
if html:
|
||||||
|
suffix += " && coverage html"
|
||||||
|
|
||||||
if outputdir:
|
if outputdir:
|
||||||
outputpath = outputdir
|
outputpath = outputdir
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue