sahara-dashboard/tox.ini
Andreas Jaeger 944da81279 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update requirements, no need for python_version anymore
- Use newer openstackdocstheme version
- Remove install_command from tox.ini, the default is fine
- Use TOX_CONSTRAINTS_FILE instead of UPPER_CONSTRAINTS_FILE since
  the later is obsolete
- Increase lower constraints to fullfill package requests

Change-Id: I7126c2646f272b3f8c568630293a194bc5ba98a9
2020-04-28 21:20:48 +02:00

80 lines
2.5 KiB
INI

[tox]
minversion = 3.1.1
envlist = py38,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = /bin/bash
commands =
{envpython} {toxinidir}/manage.py test --settings=sahara_dashboard.test.settings --exclude-tag integration {posargs}
[testenv:py36]
basepython = python3.6
setenv =
DJANGO_SETTINGS_MODULE=sahara_dashboard.test.settings
[testenv:py37]
basepython = python3.7
setenv =
DJANGO_SETTINGS_MODULE=sahara_dashboard.test.settings
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:integration]
passenv = AVCONV_INSTALLED
setenv =
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE={toxinidir}/sahara_dashboard/test/integration_tests/horizon.conf
commands = {envpython} {toxinidir}/manage.py test --settings=sahara_dashboard.test.settings --verbosity 2 --tag integration {posargs}
[testenv:releasenotes]
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:cover]
commands =
coverage erase
coverage run {toxinidir}/manage.py test --settings=sahara_dashboard.test.settings --exclude-tag integration {posargs}
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug]
commands = oslo_debug_helper -t sahara_dashboard/test {posargs}
[flake8]
show-source = True
# E123, E125 skipped as they are invalid PEP-8.
# H405 multi line docstring summary not separated with an empty line
# W503 line break before binary operator
# W504 line break after binary operator
ignore = E123,E125,H405,W503,W504
enable-extensions = H203,H106
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,.tmp
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt