Remove *.pyc files on every tox run

As we start actively moving the code around (e.g. for resources
decoupling) stale *.pyc files might lead to cryptic failures when running
tox locally (and not from the freshly cloned repo as OpenStack Infra
does).
tox installs the package being tested in venv using development mode,
thus the actually tested code is from the repo working tree, so it is
beneficial to have it cleaned from pyc files before the test run.
Now removed run_tests.sh also had similar feature, but for DB migrations
only.

The files from .tox dir are left in place, as that might speedup the
tests run somewhat.

Change-Id: I91adfbc806111e2ab023199c5dea1ea7ebeca5da
This commit is contained in:
Pavlo Shchelokovskyy 2014-12-10 21:04:01 +02:00
parent d33a5837d1
commit 94a7ec73fc

View File

@ -13,9 +13,12 @@ install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.pyc' -delete
python setup.py testr --slowest --testr-args='^(?!heat_integrationtests){posargs}'
whitelist_externals = bash
whitelist_externals =
bash
find
[testenv:integration]
commands =