[tox] minversion = 2.1 envlist = py27,pep8,docs,api-ref skipsdist = True [testenv] usedevelop = True # tox is silly... these need to be separated by a newline.... whitelist_externals = bash find rm env install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=C deps = -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete rm -f .testrepository/times.dbm [testenv:py27] commands = {[testenv]commands} stestr --test-path 'ec2api/tests/unit' run '{posargs}' stestr slowest [testenv:py35] commands = {[testenv]commands} stestr --test-path 'ec2api/tests/unit' run '{posargs}' stestr slowest [testenv:py36] commands = {[testenv]commands} stestr --test-path 'ec2api/tests/unit' run '{posargs}' stestr slowest [testenv:pep8] basepython = python3 commands = flake8 {posargs} [testenv:genconfig] commands = oslo-config-generator --config-file=etc/ec2api/ec2api-config-generator.conf [testenv:venv] basepython = python3 commands = {posargs} [testenv:docs] basepython = python3 # This environment is called from CI scripts to test and publish # the API Ref and Docs to developer.openstack.org. commands = python setup.py build_sphinx [testenv:api-ref] # This environment is called from CI scripts to test and publish # the API Ref to developer.openstack.org. commands = rm -rf api-ref/build sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [flake8] # E712 is ignored on purpose, since it is normal to use 'column == true' # in sqlalchemy. # TODO Hacking 0.6 checks to fix # H102 Apache 2.0 license header not found ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H303,H404,F403,F811,F841 # H106: Don't put vim configuration in source files # H203: Use assertIs(Not)None to check for None enable-extensions=H106,H203 exclude = .venv,.git,.tox,dist,envname,*lib/python*,*egg,build,tools max-complexity=25 [hacking] local-check-factory = ec2api.hacking.checks.factory [testenv:lower-constraints] basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt