Tox: remove pyc files before testing

This commit is contained in:
Ask Solem 2011-09-13 18:24:32 +01:00
parent 6653a34ea0
commit 281916716c
2 changed files with 15 additions and 6 deletions

3
contrib/release/removepyc.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
find "${1:-.}" -name "*.pyc" | xargs rm
find "${1:-.}" -name "*\$py.class" | xargs rm

18
tox.ini
View File

@ -12,7 +12,8 @@ basepython = python3.2
changedir = .tox
deps = -r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/test-py3k.txt
commands = nosetests -vd kombu.tests \
commands = {toxinidir}/contrib/release/removepyc.sh {toxinidir}
nosetests -vd kombu.tests \
--with-coverage3 \
--cover3-branch \
--cover3-xml \
@ -32,7 +33,8 @@ commands = nosetests -vd kombu.tests \
basepython = python2.7
deps = -r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/test.txt
commands = nosetests --with-xunit --xunit-file=nosetests.xml \
commands = {toxinidir}/contrib/release/removepyc.sh {toxinidir}
nosetests --with-xunit --xunit-file=nosetests.xml \
--with-coverage3 --cover3-xml \
--cover3-xml-file=coverage.xml
@ -40,7 +42,8 @@ commands = nosetests --with-xunit --xunit-file=nosetests.xml \
basepython = python2.6
deps = -r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/test.txt
commands = nosetests --with-xunit --xunit-file=nosetests.xml \
commands = {toxinidir}/contrib/release/removepyc.sh {toxinidir}
nosetests --with-xunit --xunit-file=nosetests.xml \
--with-coverage3 --cover3-xml \
--cover3-xml-file=coverage.xml
@ -48,7 +51,8 @@ commands = nosetests --with-xunit --xunit-file=nosetests.xml \
basepython = python2.5
deps = -r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/test.txt
commands = nosetests --with-xunit --xunit-file=nosetests.xml \
commands = {toxinidir}/contrib/release/removepyc.sh {toxinidir}
nosetests --with-xunit --xunit-file=nosetests.xml \
--with-coverage3 --cover3-xml \
--cover3-xml-file=coverage.xml
@ -58,7 +62,8 @@ basepython = python2.4
deps = -r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/py24.txt
-r{toxinidir}/requirements/test.txt
commands = nosetests --with-xunit --xunit-file=nosetests.xml \
commands = {toxinidir}/contrib/release/removepyc.sh {toxinidir}
nosetests --with-xunit --xunit-file=nosetests.xml \
--with-coverage3 --cover3-xml \
--cover3-xml-file=coverage.xml
@ -67,6 +72,7 @@ commands = nosetests --with-xunit --xunit-file=nosetests.xml \
basepython = pypy
deps = -r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/test-pypy.txt
commands = nosetests --with-xunit --xunit-file=nosetests.xml \
commands = {toxinidir}/contrib/release/removepyc.sh {toxinidir}
nosetests --with-xunit --xunit-file=nosetests.xml \
--with-coverage3 --cover3-xml \
--cover3-xml-file=coverage.xml