47 строки
1.1 KiB
INI
47 строки
1.1 KiB
INI
# Tox (https://tox.readthedocs.io/) 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, flake8, black, docs
|
|
|
|
[pytest]
|
|
addopts =
|
|
--timeout=120
|
|
--cov=mozetl
|
|
|
|
[testenv]
|
|
extras = testing
|
|
commands = pytest {posargs}
|
|
|
|
[flake8]
|
|
max-line-length = 100
|
|
|
|
[testenv:flake8]
|
|
deps =
|
|
flake8==3.6.0
|
|
commands =
|
|
flake8 mozetl tests
|
|
|
|
[testenv:black]
|
|
deps = black
|
|
commands = black --check mozetl/ tests/
|
|
|
|
[testenv:docs]
|
|
description = invoke sphinx-build to build HTML docs
|
|
basepython = python2.7
|
|
deps =
|
|
sphinx >= 1.7.5, < 2
|
|
m2r
|
|
ignore_errors = true
|
|
commands =
|
|
# https://tox.readthedocs.io/en/latest/example/documentation.html
|
|
sphinx-apidoc -o docs/source mozetl
|
|
sphinx-build \
|
|
-d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" \
|
|
--color \
|
|
-bhtml \
|
|
{posargs}
|
|
python -c 'print("documentation available under file://\{\}/docs_out/index.html".format(r"{toxworkdir}"))'
|