
Depends-On: https://review.opendev.org/c/openstack/freezer/+/936780 Change-Id: I963e0c7c5f0b3244c06396cbd2ba9f36eeaa895e
77 lines
2.0 KiB
INI
77 lines
2.0 KiB
INI
[tox]
|
||
minversion = 3.1.1
|
||
envlist = py3,pep8,pylint,docs
|
||
skipsdist = True
|
||
ignore_basepython_conflict = True
|
||
|
||
[testenv]
|
||
basepython = python3
|
||
usedevelop = True
|
||
deps =
|
||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||
-r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
|
||
install_command = pip install {opts} {packages}
|
||
setenv =
|
||
VIRTUAL_ENV={envdir}
|
||
PYTHON=coverage run --source freezerclient --parallel-mode
|
||
OS_TEST_PATH = ./freezerclient/tests/unit
|
||
commands =
|
||
find . -type f -name "*.py[c|o]" -delete
|
||
stestr run {posargs}
|
||
coverage combine
|
||
coverage html -d cover
|
||
coverage xml -o cover/coverage.xml
|
||
coverage report -m
|
||
rm -f .coverage
|
||
rm -rf .testrepository
|
||
|
||
allowlist_externals =
|
||
find
|
||
coverage
|
||
rm
|
||
|
||
python_files = test_*.py
|
||
norecursedirs = .tox .venv
|
||
|
||
[testenv:venv]
|
||
commands = {posargs}
|
||
|
||
[testenv:py39]
|
||
basepython = python3.9
|
||
|
||
[testenv:py312]
|
||
basepython = python3.12
|
||
|
||
[testenv:docs]
|
||
deps = -r{toxinidir}/doc/requirements.txt
|
||
commands = sphinx-build -b html doc/source doc/build/html
|
||
|
||
[testenv:pep8]
|
||
commands = flake8 freezerclient
|
||
|
||
[testenv:pylint]
|
||
commands = pylint --rcfile .pylintrc freezerclient
|
||
|
||
[flake8]
|
||
# Ignored hackings:
|
||
# H104 -> empty file, only comments
|
||
# H202 -> assertRaises(Exception, ...) too broad
|
||
# H404 -> Multi line docstrings should start without a leading new line.
|
||
# H405 -> Multi line docstrings should start with a one line summary followed by an empty line.
|
||
ignore = H202,H404,H405
|
||
# H106: Don’t put vim configuration in source files
|
||
# H203: Use assertIs(Not)None to check for None
|
||
enable-extensions=H106,H203
|
||
show-source = True
|
||
exclude = .venv,.tox,dist,doc,*egg,releasenotes
|
||
|
||
|
||
[testenv:releasenotes]
|
||
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 -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|