tox: rm all pyc before doing unit test
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. Closes-Bug: #1368661 Change-Id: If31ffc245ade9f62b61f99246e59208208ed4fb1
This commit is contained in:
parent
2759d2c4ee
commit
022950d9d9
5
tox.ini
5
tox.ini
|
@ -7,6 +7,7 @@ envlist = py27,pep8
|
|||
usedevelop = True
|
||||
|
||||
install_command = pip install -U {opts} {packages}
|
||||
whitelist_externals = find
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
LANG=en_US.UTF-8
|
||||
|
@ -14,7 +15,9 @@ setenv =
|
|||
LC_ALL=en_US.utf-8
|
||||
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
|
||||
python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
|
|
Loading…
Reference in New Issue