shipyard/tox.ini
One-Fine-Day b430de23dc Unit Test for WorkflowResource and WorkflowIdResource
test_workflow_api.py contains the unit tests for the WorkflowResource and
WorkflowIdResource

.coveragerc was modified to omit the unit test files from test coverage

tox.ini was modified to generate an HTML report

Change-Id: I86c81fbd65739fc8cc2fd089898aad6d87f7fdc0
2017-12-05 11:43:26 -06:00

56 lines
1.4 KiB
INI

[tox]
envlist = py35, pep8, coverage, bandit, docs
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
setenv=
PYTHONWARNING=all
basepython=python3.5
commands=
pytest \
{posargs}
[testenv:pep8]
commands = flake8 {posargs}
[testenv:bandit]
# NOTE(Bryan Strassner) ignoring airflow plugin which uses a subexec
commands =
bandit \
-r shipyard_airflow shipyard_client \
-x plugins/rest_api_plugin.py,shipyard_client/tests \
-n 5
[testenv:genconfig]
commands = oslo-config-generator --config-file=generator/config-generator.conf
[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file=generator/policy-generator.conf
[flake8]
filename = *.py
# NOTE(Bryan Strassner) ignoring F841 because of the airflow example pattern
# of naming variables even if they aren't used for DAGs and Operators.
# Doing so adds readability and context in this case.
ignore = F841
# NOTE(Bryan Strassner) excluding 3rd party and generated code that is brought into the
# codebase.
exclude = .venv,.git,.tox,build,dist,*plugins/rest_api_plugin.py,*lib/python*,*egg,alembic/env.py,docs
[testenv:docs]
whitelist_externals=rm
commands =
rm -rf docs/build
python setup.py build_sphinx {posargs}
[testenv:coverage]
commands =
pytest \
--cov-branch \
--cov-report term-missing:skip-covered \
--cov-config .coveragerc \
--cov=shipyard_airflow \
--cov=shipyard_client \
--cov-report=html