| [tox] |
| envlist = py{27,36}-cov, htmlcov, fix-lint |
| |
| [testenv] |
| deps = |
| cov: coverage |
| pytest |
| -rrequirements.txt |
| commands = |
| # run the test suite against the package installed inside tox env. |
| # We use parallel mode and then combine later so that coverage.py will take |
| # paths like .tox/py36/lib/python3.6/site-packages/<package> and collapse |
| # them into src/<package>. |
| cov: coverage run --parallel-mode -m pytest {posargs} |
| nocov: pytest {posargs} |
| |
| [testenv:htmlcov] |
| basepython = python3.6 |
| 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 |
| |
| [testenv:fix-lint] |
| skip_install = True |
| basepython = python3.6 |
| passenv = HOME HOMEPATH PROGRAMDATA |
| deps = |
| pre-commit |
| commands = |
| pre-commit run --all-files --show-diff-on-failure |
| python -c 'print("hint: run {envdir}/bin/pre-commit install to add checks as pre-commit hook")' |
| |
| [pytest] |
| minversion = 3.0 |
| testpaths = |
| tests |
| ufoLib2 |
| addopts = |
| -v |
| -r a |
| --doctest-modules |
| --doctest-ignore-import-errors |
| --pyargs |
| doctest_optionflags = |
| ALLOW_UNICODE |
| ELLIPSIS |
| |
| [flake8] |
| select = C,E,F,W,B,B9 |
| ignore = E203,E266,E501,W503 |
| exclude = .git,__pycache__,build,dist,.eggs,.tox |