2013-12-19 15:51:33 +00:00
|
|
|
[tox]
|
2020-09-07 17:58:35 +00:00
|
|
|
minversion = 2.4
|
2021-03-07 19:38:00 +00:00
|
|
|
envlist = formatting, py36, py37, py38, py39, pypy, benchmark
|
2015-12-14 15:56:33 +00:00
|
|
|
skip_missing_interpreters = true
|
2015-03-03 21:13:25 +00:00
|
|
|
|
2021-02-14 21:23:48 +00:00
|
|
|
|
2015-03-03 21:13:25 +00:00
|
|
|
[testenv:pylint]
|
|
|
|
deps =
|
2021-02-21 22:19:36 +00:00
|
|
|
-r {toxinidir}/requirements_test_min.txt
|
2021-04-05 08:27:01 +00:00
|
|
|
pre-commit~=2.11
|
2020-04-20 10:30:48 +00:00
|
|
|
commands =
|
2021-03-07 09:32:38 +00:00
|
|
|
pre-commit run pylint --all-files
|
2021-02-14 21:23:48 +00:00
|
|
|
|
2021-03-07 15:49:57 +00:00
|
|
|
|
2018-09-17 07:07:02 +00:00
|
|
|
[testenv:formatting]
|
|
|
|
basepython = python3
|
2019-03-19 19:44:59 +00:00
|
|
|
deps =
|
2021-02-21 22:19:36 +00:00
|
|
|
-r {toxinidir}/requirements_test_min.txt
|
2021-04-05 08:27:01 +00:00
|
|
|
pre-commit~=2.11
|
2019-03-19 19:44:59 +00:00
|
|
|
commands =
|
2020-12-14 12:49:23 +00:00
|
|
|
pre-commit run --all-files
|
2018-09-17 07:07:02 +00:00
|
|
|
|
2021-02-14 21:23:48 +00:00
|
|
|
|
2018-07-23 17:20:58 +00:00
|
|
|
[testenv:mypy]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
2021-04-05 08:27:01 +00:00
|
|
|
pre-commit~=2.11
|
2018-07-23 17:20:58 +00:00
|
|
|
commands =
|
2021-02-06 06:53:19 +00:00
|
|
|
pre-commit run mypy --all-files
|
2018-07-23 17:20:58 +00:00
|
|
|
|
2021-02-14 21:23:48 +00:00
|
|
|
|
2013-12-19 15:51:33 +00:00
|
|
|
[testenv]
|
2016-04-26 13:53:30 +00:00
|
|
|
setenv =
|
|
|
|
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
|
2021-02-21 22:19:36 +00:00
|
|
|
deps =
|
|
|
|
-r {toxinidir}/requirements_test.txt
|
2016-04-26 13:53:30 +00:00
|
|
|
commands =
|
2020-04-26 20:07:00 +00:00
|
|
|
; Run tests, ensuring all benchmark tests do not run
|
2021-02-21 22:19:36 +00:00
|
|
|
pytest --benchmark-disable {toxinidir}/tests/ {posargs:}
|
2016-04-26 13:53:30 +00:00
|
|
|
|
2018-09-29 08:30:45 +00:00
|
|
|
|
|
|
|
[testenv:spelling]
|
|
|
|
deps =
|
2021-02-21 22:19:36 +00:00
|
|
|
-r {toxinidir}/requirements_test.txt
|
2016-04-26 13:53:30 +00:00
|
|
|
commands =
|
2021-02-21 22:19:36 +00:00
|
|
|
pytest {toxinidir}/tests/ {posargs:} -k unittest_spelling
|
2016-04-26 13:53:30 +00:00
|
|
|
|
2021-02-14 21:23:48 +00:00
|
|
|
|
2020-03-30 15:17:02 +00:00
|
|
|
[testenv:coverage-html]
|
|
|
|
setenv =
|
|
|
|
COVERAGE_FILE = {toxinidir}/.coverage
|
|
|
|
deps =
|
2021-02-21 22:19:36 +00:00
|
|
|
-r {toxinidir}/requirements_test.txt
|
2020-03-30 15:17:02 +00:00
|
|
|
skip_install = true
|
|
|
|
commands =
|
2021-02-21 22:19:36 +00:00
|
|
|
coverage combine
|
|
|
|
coverage html --ignore-errors --rcfile={toxinidir}/.coveragerc
|
2020-03-30 15:17:02 +00:00
|
|
|
|
2021-02-14 21:23:48 +00:00
|
|
|
|
2018-06-04 17:35:34 +00:00
|
|
|
[testenv:docs]
|
|
|
|
changedir = doc/
|
2021-02-21 22:19:36 +00:00
|
|
|
deps =
|
|
|
|
-r {toxinidir}/requirements_docs.txt
|
2018-06-04 17:35:34 +00:00
|
|
|
commands =
|
2021-02-21 22:19:36 +00:00
|
|
|
sphinx-build -W -b html -d _build/doctrees . _build/html
|
2020-04-26 20:07:00 +00:00
|
|
|
|
2021-02-14 21:23:48 +00:00
|
|
|
|
2020-04-26 20:07:00 +00:00
|
|
|
[testenv:benchmark]
|
|
|
|
deps =
|
2021-02-21 22:19:36 +00:00
|
|
|
-r {toxinidir}/requirements_test.txt
|
|
|
|
pygal
|
2020-04-26 20:07:00 +00:00
|
|
|
commands =
|
|
|
|
; Run the only the benchmark tests, grouping output and forcing .json output so we
|
|
|
|
; can compare benchmark runs
|
2021-02-21 22:19:36 +00:00
|
|
|
pytest --exitfirst \
|
|
|
|
--failed-first \
|
|
|
|
--benchmark-only \
|
|
|
|
--benchmark-save=batch_files \
|
|
|
|
--benchmark-save-data \
|
|
|
|
--benchmark-autosave {toxinidir}/tests \
|
|
|
|
--benchmark-group-by="group" \
|
|
|
|
{posargs:}
|
2020-04-26 20:07:00 +00:00
|
|
|
|
2020-04-03 07:21:45 +00:00
|
|
|
[testenv:profile_against_external]
|
2021-02-21 22:19:36 +00:00
|
|
|
setenv =
|
|
|
|
PYTEST_PROFILE_EXTERNAL = 1
|
2020-04-03 07:21:45 +00:00
|
|
|
deps =
|
2021-02-21 22:19:36 +00:00
|
|
|
-r {toxinidir}/requirements_test.txt
|
2020-04-03 07:21:45 +00:00
|
|
|
gprof2dot
|
|
|
|
commands =
|
2021-02-21 22:19:36 +00:00
|
|
|
pytest --exitfirst \
|
|
|
|
--profile-svg {toxinidir}/tests/profile/test_profile_against_externals.py
|