If py26 tests are run first, there is some incompatibility in the
.testrepository that breaks several tests. To get around this, you
need to run the py33 tests first. This change was made over in the
cliff project.
Before:
(.venv)terry@brat:~/hp/sdk$ rm -rf .testrepository/
(.venv)terry@brat:~/hp/sdk$ tox
...
py26: commands succeeded
py27: commands succeeded
ERROR: py33: commands failed
ERROR: py34: commands failed
ERROR: pypy: commands failed
pep8: commands succeeded
After:
(.venv)terry@brat:~/hp/sdk$ rm -rf .testrepository/
(.venv)terry@brat:~/hp/sdk$ tox
...
py33: commands succeeded
py34: commands succeeded
py26: commands succeeded
py27: commands succeeded
pypy: commands succeeded
pep8: commands succeeded
congratulations :)
(.venv)terry@brat:~/hp/sdk$
Change-Id: I64925097ce003659c4daa0e105bd06dc30726921
35 lines
871 B
INI
35 lines
871 B
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py33,py34,py26,py27,pypy,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[flake8]
|
|
# H404 is a docstring rule that is not followed at this time, but
|
|
# feel free to fix
|
|
# H803 skipped on purpose per list discussion.
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
show-source = True
|
|
ignore = E123,E125,H404,H803
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|