[PATCH 1/2] tox: Cleanup '.pyc' files before run

Stephen Finucane stephen.finucane at intel.com
Wed Jan 20 09:10:48 AEDT 2016


Sometimes leftover '.pyc' files can cause tests to fail. Ensure this
never happens by always removing these files on start.

Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
---
 tox.ini | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tox.ini b/tox.ini
index 2b19d3c..a5e20a8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,9 +1,10 @@
 [tox]
-minversion = 1.6
+minversion = 2.0
 envlist = py{27,34}-django{16,17,18,19}
 skipsdist = True
 
 [testenv]
+whitelist_externals = find
 deps =
     -r{toxinidir}/requirements-test.txt
     django16: django>=1.6,<1.7
@@ -17,6 +18,7 @@ passenv =
     PW_TEST_DB_USER PW_TEST_DB_PASS
     DISPLAY SELENIUM_BROWSER PW_SKIP_BROWSER_TESTS
 commands =
+    find . -type f -name "*.pyc" -delete
     {toxinidir}/manage.py test --noinput --liveserver=localhost:9000-9200 \
         '{posargs:patchwork}'
 
-- 
2.0.0



More information about the Patchwork mailing list