Delete python bytecode before every test run

Bring over the cleaning line from run_tests.sh for the pyc files to
all the tox runs.

This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: Ib095a107537446d6e43a222cf68f7b84b9368f60
Closes-Bug: #1368661
This commit is contained in:
Haiwei Xu 2015-12-02 09:47:36 +09:00
parent 865dab02b7
commit 459e32bd37
1 changed files with 3 additions and 1 deletions

View File

@ -9,9 +9,11 @@ setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
commands = python monasca_test_setup.py
commands = find . -type f -name "*.pyc" -delete
python monasca_test_setup.py
python setup.py testr --slowest --testr-args="{posargs}"
whitelist_externals = bash
find
[testenv:pep8]
deps = -r{toxinidir}/pep8-test-requirements.txt