diff --git a/modules/django.py b/modules/django.py index cd46834..058dd78 100644 --- a/modules/django.py +++ b/modules/django.py @@ -123,7 +123,7 @@ def manage(args="help", workingdir=None, prefix="", suffix=""): @task -def coverage(args="", workingdir=None, outputdir=None, +def coverage(args="test", workingdir=None, outputdir=None, coveragerc=False, report=True, html=True): """ helper method that uses the coverage package @@ -139,20 +139,20 @@ def coverage(args="", workingdir=None, outputdir=None, suffix = "" - if report: - suffix += "&& coverage report" - - 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( + prefix += " --rcfile={coveragepath}/setup.cfg".format( coveragepath=coveragepath) + if report: + suffix += " && coverage report" + + if html: + suffix += " && coverage html" + if outputdir: outputpath = outputdir