Delete python bytecode before every test run

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

The target bytecodes for deletion are in normal directories,
but not in dot started directory.

Change-Id: Ie5e55b29a2f71c4c4f886de27f89f1b264b81529
This commit is contained in:
Adam 2016-01-10 15:56:00 +08:00 committed by Gauvain Pocentek
parent 22bc7731de
commit 02fea338bc

View File

@ -11,6 +11,7 @@ install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
/usr/bin/find . -type f -name "*.py[co]" -delete
python setup.py testr --testr-args='{posargs}'
[tox:jenkins]