Delete python bytecode before every test run
Because python creates pyc|pyo files and __pycache__ directories during tox runs, certain changes in the tree, like deletes of files, or switching branches, can create spurious errors. The target bytecodes for deletion are in normal directories, but not in dot started directory. Change-Id: Id64c86439bf265b216f7536c51fc22cea7b316da
This commit is contained in:
4
tox.ini
4
tox.ini
@@ -9,7 +9,9 @@ usedevelop = True
|
|||||||
install_command = pip install -U {opts} {packages}
|
install_command = pip install -U {opts} {packages}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-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:pypy]
|
[testenv:pypy]
|
||||||
deps = setuptools<3.2
|
deps = setuptools<3.2
|
||||||
|
Reference in New Issue
Block a user