[tox]
minversion = 1.6
envlist = pep8,py27
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata} {opts} {packages}
setenv =
   VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
       http://tarballs.openstack.org/horizon/horizon-stable-ocata.tar.gz
commands =
    find . -type f -name "*.pyc" -delete
    /bin/bash run_tests.sh -N --no-pep8 {posargs}
whitelist_externals = find

[testenv:py27]
setenv = DJANGO_SETTINGS_MODULE=mistraldashboard.test.settings

[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

[testenv:debug]
commands = oslo_debug_helper {posargs}

[flake8]
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,horizon

[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
