bfff1f4ed3
This PS unskips the last remaining git test in test_source which had an unconditional unittests.skip() decorator applied to it. The source_cleanup test now issues a warning if the repo path isn't found and the associated test (passing in a bad path) simply asserts that the warning was called. This also adds a conditional skip to the git clone unit tests in the event that the user doesn't have network connectivity. Change-Id: Ic300c48a4e0c361e37ec15cd3675415f8170a817
57 lines
1.3 KiB
INI
57 lines
1.3 KiB
INI
[tox]
|
|
skipsdist = True
|
|
envlist = py35, pep8, coverage, bandit
|
|
|
|
[testenv]
|
|
deps=
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
passenv=HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy
|
|
setenv=
|
|
VIRTUAL_ENV={envdir}
|
|
basepython = python3.5
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
whitelist_externals = find
|
|
flake8
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
python -V
|
|
{toxinidir}/tools/run-unit-tests.sh {posargs}
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
python setup.py build_sphinx
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=etc/armada/config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands =
|
|
oslopolicy-sample-generator --config-file=etc/armada/policy-generator.conf
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
|
|
[testenv:bandit]
|
|
commands =
|
|
bandit -r armada -x armada/tests -n 5
|
|
|
|
[testenv:coverage]
|
|
passenv=http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY
|
|
setenv=
|
|
VIRTUAL_ENV={envdir}
|
|
commands =
|
|
python -m pytest \
|
|
--cov-branch \
|
|
--cov-report term-missing:skip-covered \
|
|
--cov-config .coveragerc \
|
|
--cov=armada
|
|
|
|
[flake8]
|
|
filename = *.py
|
|
ignore = E722
|
|
exclude = .git,.tox,dist,*lib/python*,*egg,build,releasenotes,docs/*,hapi,venv
|