57 lines
1.2 KiB
INI
57 lines
1.2 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 = py27, py35, py36, py37, py38, docs, flake8, coverage
|
|
skip_missing_interpreters = true
|
|
toxworkdir = {homedir}/.tox/elementpath
|
|
|
|
[testenv]
|
|
deps =
|
|
lxml
|
|
xmlschema~=1.0.14
|
|
docs: Sphinx
|
|
flake8: flake8
|
|
coverage: coverage
|
|
commands = python -m unittest
|
|
whitelist_externals = make
|
|
|
|
[testenv:py27]
|
|
commands = python tests/test_elementpath.py
|
|
|
|
[testenv:py38]
|
|
deps =
|
|
lxml==4.3.5
|
|
xmlschema~=1.0.14
|
|
commands = python -m unittest
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
make -C doc html
|
|
make -C doc latexpdf
|
|
make -C doc doctest
|
|
|
|
[flake8]
|
|
max-line-length = 119
|
|
|
|
[testenv:flake8]
|
|
commands =
|
|
flake8 --ignore=F401,F811,F821 elementpath
|
|
|
|
[testenv:coverage]
|
|
commands =
|
|
coverage run -p setup.py test -q
|
|
coverage combine
|
|
coverage report -m
|
|
|
|
[testenv:build]
|
|
deps =
|
|
setuptools
|
|
wheel
|
|
commands =
|
|
python setup.py clean --all
|
|
python setup.py sdist --dist-dir {toxinidir}/dist
|
|
python setup.py bdist_wheel --universal --dist-dir {toxinidir}/dist
|