cloudbase-init/tox.ini
Adrian Vladu 28f4fbbd45 Fix Python 3 unit tests
Removed the functools partial from being mocked, as it is used
internally in the mocking implementation and generates unit test error.

Updated tox / unit test requirements according to new OpenStack gate
requirements.

Updating the tox requirements added a new set of flakes rules that had
to be skipped for now, which will be addressed in upcoming patches.

Change-Id: I231ca3b15313541e2c43785e80d9db5659aa1cc3
2020-09-30 15:14:05 +03:00

53 lines
1.4 KiB
INI

[tox]
minversion = 1.6
envlist = docs,py37,pep8
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands = flake8 {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source cloudbaseinit --parallel-mode
commands =
stestr run --no-subunit-trace {posargs}
coverage combine
coverage report --fail-under=82 --skip-covered
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:releasenotes]
basepython = python3
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
basepython = python3
deps =
sphinx_rtd_theme
commands =
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
[flake8]
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
ignore = E125,E251,W503,W504,E305,E731,E117,W605,F632
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools