From 281916716c329a5eb84296b8298a31c828feacb2 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 13 Sep 2011 18:24:32 +0100 Subject: [PATCH] Tox: remove pyc files before testing --- contrib/release/removepyc.sh | 3 +++ tox.ini | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100755 contrib/release/removepyc.sh diff --git a/contrib/release/removepyc.sh b/contrib/release/removepyc.sh new file mode 100755 index 00000000..1c66363b --- /dev/null +++ b/contrib/release/removepyc.sh @@ -0,0 +1,3 @@ +#!/bin/bash +find "${1:-.}" -name "*.pyc" | xargs rm +find "${1:-.}" -name "*\$py.class" | xargs rm diff --git a/tox.ini b/tox.ini index 547caaed..931d47b9 100644 --- a/tox.ini +++ b/tox.ini @@ -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