From 43e656f2412fdeb2f23f6f6cc8cd2607a67bdfcb Mon Sep 17 00:00:00 2001 From: Tal Einat Date: Sat, 7 Feb 2015 13:18:02 +0200 Subject: [PATCH] have tox run tests both with and without coverage --- tox.ini | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index eb785b3..4f5dfa0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{26,27,32,33,34} +envlist = py{26,27,32,33,34}-{with,without}_coverage [testenv] ; setenv = @@ -19,11 +19,15 @@ whitelist_externals = commands = ; run tests both with and without the C extensions (including Cython) ; merge the coverage run results from both runs - py26: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests - py{27,32,33,34}: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests - mv .coverage .coverage.with_extensions + py26-without_coverage: {envbindir}/unit2 discover tests -t {toxinidir} + py26-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests + py{27,32,33,34}-without_coverage: {envpython} -m unittest discover tests + py{27,32,33,34}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests + with_coverage: mv .coverage .coverage.with_extensions {envpython} -c 'import os; [os.remove(os.path.join(d, fn)) for (d, dns, fns) in os.walk("{envsitepackagesdir}/fuzzysearch") for fn in fns if fn.endswith(".so")]' - py26: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests - py{27,32,33,34}: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests - mv .coverage .coverage.no_extensions - {envbindir}/coverage combine + py26-without_coverage: {envbindir}/unit2 discover tests -t {toxinidir} + py26-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests + py{27,32,33,34}-without_coverage: {envpython} -m unittest discover tests + py{27,32,33,34}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests + with_coverage: mv .coverage .coverage.no_extensions + with_coverage: {envbindir}/coverage combine