summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini22
1 files changed, 22 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index 489ad214d..475e4f9a3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,3 +14,25 @@ basepython = python2.7
commands = python -m nose2 -v
usedevelop = True
deps = psycopg2
+
+[coverage]
+rcfile = {toxinidir}/coverage.ini
+rc = --rcfile={[coverage]rcfile}
+dir = --directory={envname}
+
+[testenv:coverage]
+basepython = python2.7
+commands =
+ coverage run {[coverage]rc} -m nose2 -v
+ coverage combine {[coverage]rc}
+ coverage html {[coverage]rc} {[coverage]dir}
+#sitepackages = True
+usedevelop = True
+whitelist_externals = python-coverage
+deps = coverage
+# Don't use --pre version packages.
+install_command = pip install {opts} {packages}
+setenv =
+ COVERAGE_PROCESS_START={[coverage]rcfile}
+ COVERAGE_OPTIONS="-p"
+ COVERAGE_FILE={toxinidir}/.coverage