baf17c8cff
Unit tests can be run via: tox -e py27 Style checks can be run via: tox -e pep8
36 lines
948 B
INI
36 lines
948 B
INI
[tox]
|
||
minversion = 1.8
|
||
skipsdist = True
|
||
envlist = py27,pep8
|
||
|
||
[testenv]
|
||
usedevelop = True
|
||
install_command = pip install -U {opts} {packages}
|
||
setenv = VIRTUAL_ENV={envdir}
|
||
PYTHONDONTWRITEBYTECODE = 1
|
||
LANGUAGE=en_US
|
||
LC_ALL=en_US.UTF-8
|
||
PYTHONWARNINGS=default::DeprecationWarning
|
||
TESTS_DIR=./kayobe/tests/unit/
|
||
deps = -r{toxinidir}/test-requirements.txt
|
||
commands = unit2 discover {posargs}
|
||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||
|
||
[testenv:pep8]
|
||
whitelist_externals = bash
|
||
commands =
|
||
flake8 {posargs}
|
||
|
||
[testenv:venv]
|
||
setenv = PYTHONHASHSEED=0
|
||
commands = {posargs}
|
||
|
||
[flake8]
|
||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||
import-order-style = pep8
|
||
max-complexity=17
|
||
# [H106] Don’t put vim configuration in source files.
|
||
# [H203] Use assertIs(Not)None to check for None.
|
||
# [H904] Delay string interpolations at logging calls.
|
||
enable-extensions=H106,H203,H904
|