]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
tox: Cleanup '.pyc' files before run
authorStephen Finucane <stephen.finucane@intel.com>
Tue, 19 Jan 2016 22:02:52 +0000 (22:02 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Mon, 25 Jan 2016 16:09:36 +0000 (16:09 +0000)
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@intel.com>
tox.ini

diff --git a/tox.ini b/tox.ini
index 2b19d3c745ea35ae342eb9c6efa04edcd8794ae1..a5e20a8f698da1c1aac8947c7acd1deac38c97aa 100644 (file)
--- 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}'