Delete python bytecode before every test run

Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.

Change-Id: I9e3b8c8cb0e6df8f3b67ec9d4fc5bc5d25356d16
Closes-Bug: #1520036
This commit is contained in:
OTSUKA, Yuanying 2015-11-26 10:58:03 +09:00
parent 28fb0443f7
commit 40f5e2234a

View File

@ -7,9 +7,12 @@ envlist = py27,py34,pep8
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install {opts} {packages}
whitelist_externals = find
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --testr-args='{posargs}'
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr --testr-args='{posargs}'
[tox:jenkins]
downloadcache = ~/cache/pip