[tox] envlist = {pypy,pep8,py27,py3} [testenv] usedevelop = True deps = coverage -rrequirements.txt -rtest-requirements.txt passenv = HOME http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY whitelist_externals = bash commands = /usr/bin/find . -type f -name "*.pyc" -delete [testenv:coverage] commands = coverage run -m pytest --capture=no --strict {posargs} coverage report -m --omit="*/test*" --fail-under=90 [testenv:venv] commands = {posargs} [testenv:docs] commands= bash -c "rm -rf doc/build" doc8 doc sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html [doc8] # Settings for doc8: extensions = .rst [testenv:releasenotes] commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:linters] deps = {[testenv:pep8]deps} commands = {[testenv:pep8]commands} [testenv:integration] commands = coverage run -m pytest --capture=no --strict "tests/int" [testenv:unit] commands = coverage run -m pytest --capture=no --strict "tests/unit" [testenv:pep8] deps = flake8 flake8-import-order pep8-naming commands = flake8 [testenv:py3pep8] basepython = python3 deps = flake8 flake8-import-order pep8-naming commands = flake8 [flake8] # tests/common/ansible-lint/test comes from openstack-ansible-tests, # blacklist it exclude = .tox,*.egg,.git,_build,docs-rst,tests/common/ansible-lint/test