diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-01-08 22:31:13 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-01-08 22:31:13 +0000 |
commit | 2fc5ed63a04221e8cf226de3dc5b6b754c0b5c27 (patch) | |
tree | 571b40c658f086773148149f2b289bfd8b2fb65a /tox.ini | |
parent | 980ff3866c955661c8d99d243b27f1bc9273f650 (diff) | |
parent | 83d61566cee8b8e786b46103cf3e72fbe8077c1a (diff) | |
download | python-neutronclient-2fc5ed63a04221e8cf226de3dc5b6b754c0b5c27.tar.gz |
Merge "Delete python bytecode before every test run"
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -13,7 +13,14 @@ usedevelop = True install_command = pip install -U {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --testr-args='{posargs}' +# Delete bytecodes from normal directories before running tests. +# Note that bytecodes in dot directories will not be deleted +# to keep bytecodes of python modules installed into virtualenvs. +commands = sh -c "find . -type d -name '.?*' -prune -o \ + \( -type d -name '__pycache__' -o -type f -name '*.py[co]' \) \ + -print0 | xargs -0 rm -rf" + python setup.py testr --testr-args='{posargs}' +whitelist_externals = sh [testenv:pep8] commands = flake8 |