# 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}"))'