trove-dashboard/tox.ini
Rob Cresswell 0c9dab4e6b Fix Django 1.10 Compatibility
Fixes a number of django 1.9 and 1.10 issues.

Also adds test environments for both.

Change-Id: Ic76ed18880170b8eaf25b4e183a5bc92bbbb82d9
Co-Authored-By: Duk Loi <duk@tesora.com>
2016-12-09 14:51:46 -05:00

68 lines
2.0 KiB
INI

[tox]
minversion = 1.6
envlist = py27,pep8,py27dj18
skipsdist = True
[testenv]
usedevelop = True
install_command = {toxinidir}/tools/pip_install.sh \
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \
{opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = /bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:py27]
setenv = DJANGO_SETTINGS_MODULE=trove_dashboard.test.settings
[testenv:pep8]
commands = flake8
[testenv:venv]
# This target does not use script since we do not need to install horizon.
install_command = pip install \
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \
-U --force-reinstall {opts} {packages}
commands = {posargs}
# Django-1.8 is LTS
[testenv:py27dj18]
basepython = python2.7
commands = pip install django>=1.8,<1.9
/bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:py27dj19]
basepython = python2.7
commands = pip install django>=1.9,<1.10
/bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:py27dj110]
basepython = python2.7
commands = pip install django>=1.10,<1.11
/bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:py27integration]
basepython = python2.7
commands = /bin/bash run_tests.sh -N --integration --selenium-headless {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}
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
show-source = True
# H405 multi line docstring summary not separated with an empty line
ignore = H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,releasenotes