Files
sushy-cli/tox.ini
Riccardo Pittau 580936bba4 Add pep8 check for import order
Set flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.

Change-Id: Iacbf2a96585fb6e4f784a2541bfad67bb0c9c0e4
2020-04-21 15:46:44 +02:00

71 lines
1.9 KiB
INI

[tox]
minversion = 3.1.0
envlist = py3, pep8
skipsdist = True
ignore_basepython_conflict = true
[testenv]
usedevelop = True
basepython = python3
setenv =
VIRTUAL_ENV = {envdir}
PYTHONWARNINGS = default::DeprecationWarning
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run {posargs}
stestr slowest
[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -b html -W doc/source doc/build/html
[testenv:pdf-docs]
whitelist_externals = make
deps = {[testenv:docs]deps}
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --parallel-mode
# After running this target, visit sushycli/cover/index.html
# in your browser, to see a nicer presentation report with annotated
# HTML listings detailing missed lines.
commands = coverage erase
stestr run {posargs}
coverage combine
coverage report
coverage html
coverage xml -o cover/coverage.xml
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]
commands = flake8 {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123, E125
builtins = _
exclude = .venv, .git, .tox, dist, doc, *lib/python*, *egg,build
import-order-style = pep8
application-import-names = sushycli
filename = *.py
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt