From 766e5057acf646d8930c9da5967d8f536f8d72f5 Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Thu, 3 May 2012 20:02:22 +0200 Subject: [PATCH] tox now combine code coverage results --- setup.cfg | 4 ++-- tox.ini | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3e557f9..fabcb6b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,5 +6,5 @@ tag_date = true release = egg_info -RDb '' [nosetests] -with-coverage = true -cover-package = wsme +#with-coverage = true +#cover-package = wsme diff --git a/tox.ini b/tox.ini index cde39bb..3505208 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist = py27,py32,pypy,py25simplejson +envlist = clean,py27,py32,pypy,py25simplejson,coverage [common] testtools = @@ -15,7 +15,10 @@ deps = coverage transaction -commands=nosetests --verbose [] +#commands=nosetests --verbose [] +commands= + {envbindir}/coverage run -p {envbindir}/nosetests -w ./wsme/tests --verbose {posargs} + downloadcache=.tox/cache [testenv:py25simplejson] @@ -27,3 +30,20 @@ deps= simplejson transaction<=1.1.1 +[testenv:clean] +basepython=python +deps= + coverage +commands= + {envbindir}/coverage erase + rm -f .coverage* + +[testenv:coverage] +basepython=python +deps= + coverage +commands= + {envbindir}/coverage combine + {envbindir}/coverage xml wsme/*.py wsme/protocols/*.py + {envbindir}/coverage report wsme/*.py wsme/protocols/*.py +