config/configutilities/configutilities/tox.ini

47 lines
1.4 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 = flake8,pylint
# Tox does not work if the path to the workdir is too long, so move it to /tmp
toxworkdir = /tmp/{env:USER}_ccutiltox
stxdir = {toxinidir}/../../..
[testenv]
whitelist_externals = find
install_command = pip install --no-cache-dir {opts} {packages}
[testenv:venv]
commands = {posargs}
[testenv:flake8]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
commands = flake8 {posargs}
# hacking pulls in flake8 2.5.5 which does not support parsing multi-line ignore list
# H series are hacking
# H102: Apache 2.0 license header not found
# H104: File contains nothing but comments
# H306: imports not in alphabetical order
# H401: docstring should not start with a space
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
[flake8]
ignore = H102,H104,H306,H401,H403,H404,H405
exclude = dist,build
[testenv:pylint]
basepython = python3
sitepackages = False
deps = -r{toxinidir}/test-requirements.txt
-e{[tox]stxdir}/stx-update/tsconfig/tsconfig
pylint
commands =
pylint {posargs} configutilities --rcfile=./pylint.rc