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: I747401d1c895cc0bffc4666054fdc01264c6fd0f
This commit is contained in:
Adam 2016-01-10 16:48:49 +08:00
parent bdc1a01bf0
commit 510934fbed
1 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,9 @@ envlist = py34,py27,pypy,pep8
deps = .[dogpile]
.[mongo]
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8