mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-09 08:13:21 +08:00
48 lines
1.2 KiB
INI
48 lines
1.2 KiB
INI
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
# and then run "tox" from this directory.
|
|
|
|
[tox]
|
|
envlist = py27, coverage, flake8, bandit
|
|
|
|
[flake8]
|
|
max-line-length = 100
|
|
|
|
[testenv]
|
|
# using sitepackages is not a good idea, but Koji... :(
|
|
sitepackages = True
|
|
install_command = pip install --force-reinstall --ignore-installed {packages}
|
|
deps =
|
|
copr
|
|
mock
|
|
nose
|
|
pytest
|
|
vcrpy
|
|
commands = py.test -v {posargs}
|
|
|
|
[testenv:coverage]
|
|
basepython = python2
|
|
deps =
|
|
{[testenv]deps}
|
|
coverage
|
|
commands =
|
|
coverage run --parallel-mode -m pytest
|
|
coverage combine
|
|
coverage report --omit=tests/*,.tox/*,/usr/* -m --skip-covered
|
|
|
|
[testenv:flake8]
|
|
basepython = python2
|
|
skip_install = true
|
|
deps = flake8
|
|
commands = flake8 --ignore E731 --exclude .tox,.git,module_build_service/migrations
|
|
ignore_outcome = True
|
|
|
|
[testenv:bandit]
|
|
basepython = python2
|
|
skip_install = true
|
|
deps = bandit
|
|
commands =
|
|
/bin/bash -c "bandit -r -ll $(find . -mindepth 1 -maxdepth 1 ! -name tests ! -name \.\* -type d -o -name \*.py)"
|
|
ignore_outcome = True
|