[tox] minversion = 2.0 envlist = py35-constraints,py27-constraints,pypy-constraints,pep8-constraints,functional skipsdist = True [testenv] usedevelop = True install_command = {[testenv:common-constraints]install_command} setenv = VIRTUAL_ENV={envdir} OS_TEST_PATH=mogan/tests/unit deps = -r{toxinidir}/test-requirements.txt commands = rm -f .testrepository/times.dbm python setup.py test --slowest --testr-args='{posargs}' [testenv:common-constraints] install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} [testenv:pep8] commands = flake8 {posargs} [testenv:pep8-constraints] install_command = {[testenv:common-constraints]install_command} commands = flake8 {posargs} [testenv:venv] commands = {posargs} [testenv:venv-constraints] install_command = {[testenv:common-constraints]install_command} commands = {posargs} [testenv:cover] commands = python setup.py test --coverage --testr-args='{posargs}' coverage report [testenv:cover-constraints] install_command = {[testenv:common-constraints]install_command} commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] commands = python setup.py build_sphinx oslo-config-generator --config-file=tools/config/mogan-config-generator.conf [testenv:releasenotes] commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:docs-constraints] install_command = {[testenv:common-constraints]install_command} commands = python setup.py build_sphinx [testenv:debug] commands = oslo_debug_helper {posargs} [testenv:functional] setenv = OS_TEST_PATH=mogan/tests/functional/ commands = python setup.py testr --slowest --testr-args="{posargs}" [testenv:debug-constraints] install_command = {[testenv:common-constraints]install_command} commands = oslo_debug_helper {posargs} [testenv:genconfig] sitepackages = False envdir = {toxworkdir}/venv commands = oslo-config-generator --config-file=tools/config/mogan-config-generator.conf [testenv:genpolicy] sitepackages = False envdir = {toxworkdir}/venv commands = oslopolicy-sample-generator --config-file=tools/config/mogan-policy-generator.conf [testenv:api-ref] # This environment is called from CI scripts to test and publish # the API Ref to developer.openstack.org. whitelist_externals = bash commands = bash -c 'rm -rf api-ref/build' sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [flake8] # H405 is another one that is good as a guideline, but sometimes # multiline doc strings just don't have a natural summary # line. Rejecting code for this reason is wrong. show-source = True ignore = H405 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [hacking] import_exceptions = mogan.common.i18n [testenv:lower-constraints] basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt