1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
[tox]
envlist = lint, py27, py36, htmlcov
[testenv]
deps =
pytest
coverage
ufonormalizer
py27: mock>=2.0.0
-rrequirements.txt
commands =
coverage run --parallel-mode -m pytest {posargs}
[testenv:lint]
skip_install = true
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
python -c 'print(r"hint: run {envdir}/bin/pre-commit or {envdir}/Scripts/pre-commit install to add checks as pre-commit hook")'
[testenv:htmlcov]
deps =
coverage
skip_install = true
commands =
coverage combine
coverage report
coverage html
[testenv:codecov]
passenv = *
deps =
coverage
codecov
skip_install = true
ignore_outcome = true
commands =
coverage combine
codecov --env TRAVIS_PYTHON_VERSION
[flake8]
select = B,C,E,F,W,T4,B9
ignore = E203,E266,E501,W503
max-line-length = 80
max-complexity = 18
exclude = .git,__pycache__,build,dist,.eggs,.tox
|