From 348c26094baf19977c1e88752b5d26108726aa37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dulko?= Date: Fri, 8 Jul 2016 12:01:29 +0200 Subject: [PATCH] Delete *.pyc files before running tox tests When jumping between different review branches .pyc files of newly introduced .py files are getting left behind. When these are related to DB migrations all tests start to fail with: "AssertionError: There is no script for XY version". This is pretty annoying, so why not remove all *.pyc files before running any tests? This commit implements that. Change-Id: Iac223fb156af3729b51fc2b11323a7cc30f9c07d --- tox.ini | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index fb91e90ae97..3be540af885 100644 --- a/tox.ini +++ b/tox.ini @@ -20,9 +20,13 @@ deps = -r{toxinidir}/test-requirements.txt # to ncpu, to specify something else use # the concurrency= option. # call ie: 'tox -epy27 -- --concurrency=4' -commands = ostestr {posargs} +commands = + find . -type f -name "*.pyc" -delete + ostestr {posargs} -whitelist_externals = bash +whitelist_externals = + bash + find passenv = *_proxy *_PROXY [testenv:api-ref]