Don't write python bytecode while testing

This patch was based on the Nova patch:
https://review.openstack.org/#/c/121044

This should reduce the number of times you need to completely delete
your tox dir because you have stale pyc files around.

In Ironic we have hit this problem a number of times, migrating to
oslo.message was a big one that caused a lot of confusion.

Closes-Bug: #1368661
Change-Id: I7dda3ad879beff1e494a36144c941a847177c2ef
This commit is contained in:
Lucas Alvares Gomes 2014-09-12 12:04:50 +01:00
parent 526bb53528
commit 3aac5a1992

View File

@ -7,6 +7,7 @@ envlist = py26,py27,pep8
usedevelop = True usedevelop = True
install_command = pip install -U {opts} {packages} install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
whitelist_externals = bash whitelist_externals = bash