os-xenapi/tox.ini

64 lines
1.6 KiB
INI

[tox]
minversion = 2.0
envlist = py35,py27,pypy,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
whitelist_externals = find
rm
commands =
find . -type f -name "*.pyc" -delete
py27: python setup.py test --slowest --testr-args='{posargs}'
py35: ostestr --color --slowest --blacklist_file exclusion_py3.txt
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[testenv:cover]
# Use python2.7 explicitly so that it's compatible with python2.4 used for plugins.
basepython=/usr/bin/python2.7
commands =
coverage erase
find . -type f -name "*.pyc" -delete
coverage run -m unittest discover
coverage report
coverage html
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:releasenotes]
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]
commands = oslo_debug_helper {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt