38084ae2f7
Drops kargo-cli as a heavy dependency. Added py.test to tox config to run unit testing. Change-Id: I3e282ba079d22656483b1c3f94eaedb260b5020c
55 lines
1.3 KiB
INI
55 lines
1.3 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = bashate, pep8, py27
|
|
|
|
[testenv]
|
|
whitelist_externals = py.test
|
|
usedevelop = True
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
commands = py.test -vv #{posargs:tests}
|
|
|
|
[testenv:doc8]
|
|
commands = doc8 doc
|
|
|
|
[testenv:docs]
|
|
whitelist_externals = /bin/rm
|
|
commands =
|
|
/bin/rm -rf doc/build
|
|
python setup.py build_sphinx
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
# Ignore target directories
|
|
ignore-path = doc/build*
|
|
# File extensions to use
|
|
extensions = .rst,.txt
|
|
# Maximal line length should be 79 but we have some overlong lines.
|
|
# Let's not get far more in.
|
|
max-line-length = 80
|
|
# Disable some doc8 checks:
|
|
# D000: Check RST validity (cannot handle lineos directive)
|
|
ignore = D000
|
|
|
|
[testenv:bashate]
|
|
whitelist_externals = bash
|
|
commands = bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -0 bashate -v"
|
|
|
|
[testenv:pep8]
|
|
usedevelop = False
|
|
whitelist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir}/* -type f -name '*.py' -print0 | xargs -0 flake8"
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
show-source = true
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
|