From 35a5ba1cd011a7099ba60ebb7a864125682b5e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Antal?= Date: Thu, 17 Dec 2015 11:58:16 +0100 Subject: [PATCH] Remove *.pyc files before running tox tests Modified tox.ini to remove any .pyc file before running tests. Also, now it removes all the __pycache__ folders which was also in the bug report. Change-Id: I2f60751b155f8098b746339c12406b934bcdbcf9 Closes-Bug: #1525852 --- tox.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index fa3d57ab1..bcee22487 100644 --- a/tox.ini +++ b/tox.ini @@ -5,12 +5,16 @@ skipsdist = True [testenv] usedevelop = True +whitelist_externals = find install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = + find . -type f -name "*.pyc" -delete + find . -type d -name "__pycache__" -delete + python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8