ara/tox.ini

74 lines
1.7 KiB
INI
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[tox]
minversion = 2.0
envlist = pep8,py27,py37,py36,py35
skipdist = True
skip_missing_interpreters = True
# ^ this does not affect CI where all jobs start with specific environment
[testenv]
basepython =
{py27,venv,cover,docs,pep8}: python2
{py35}: python3.5
{py36}: python3.6
{py37}: python3.7
sitepackages = True
usedevelop = True
install_command = pip install -U {opts} {packages} -c{env:CONSTRAINTS_FILE:/dev/null}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pep8]
# B303 - Use of insecure MD2, MD4, or MD5 hash function.
# We're using sha1 to generate a hash of file contents.
commands =
python -m flake8 ara
bandit -r ara -x ara/tests --skip B303
bashate -v --ignore E006,E011 {toxinidir}/run_tests.sh
[testenv:py27]
commands =
python -m pytest -v -Werror ara/tests/unit
passenv =
HOME
[testenv:py35]
commands =
python -m pytest -v -Werror ara/tests/unit
passenv =
HOME
[testenv:py36]
commands =
python -m pytest -v -Werror ara/tests/unit
passenv =
HOME
[testenv:py37]
commands =
python -m pytest -v -Werror ara/tests/unit
passenv =
HOME
[testenv:cover]
commands =
py.test --cov=ara --cov-report=html ara/tests/unit
passenv =
HOME
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# E741, short ambiguous variable names
# H106 Dont put vim configuration in source files
# H203 Use assertIs(Not)None to check for None
# W504 line break after binary operator
ignore = E123,E125,E741,W504
enable-extensions=H106,H203
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build