summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-01-08 22:31:13 +0000
committerGerrit Code Review <review@openstack.org>2016-01-08 22:31:13 +0000
commit2fc5ed63a04221e8cf226de3dc5b6b754c0b5c27 (patch)
tree571b40c658f086773148149f2b289bfd8b2fb65a /tox.ini
parent980ff3866c955661c8d99d243b27f1bc9273f650 (diff)
parent83d61566cee8b8e786b46103cf3e72fbe8077c1a (diff)
downloadpython-neutronclient-2fc5ed63a04221e8cf226de3dc5b6b754c0b5c27.tar.gz
Merge "Delete python bytecode before every test run"
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini9
1 files changed, 8 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index 9281e78..028453f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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