-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathtox.ini
More file actions
46 lines (39 loc) · 1.1 KB
/
tox.ini
File metadata and controls
46 lines (39 loc) · 1.1 KB
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 (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 = py37, 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.8.4
commands =
flake8 mozetl tests
[testenv:black]
deps = black==20.8b1
commands = black --check mozetl/ tests/
[testenv:docs]
description = invoke sphinx-build to build HTML docs
basepython = python3.7
deps =
sphinx >= 3.5.1, < 4
m2r2 == 0.3.2
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}"))'