third_party.pylibs.pylint.src/tox.ini

93 lines
2.0 KiB
INI
Raw Normal View History

[tox]
minversion = 2.4
envlist = formatting, py36, py37, py38, py39, pypy, benchmark
skip_missing_interpreters = true
2021-02-14 21:23:48 +00:00
[testenv:pylint]
deps =
2021-02-21 22:19:36 +00:00
-r {toxinidir}/requirements_test_min.txt
pre-commit==2.10.1
commands =
pre-commit run pylint --all-files
2021-02-14 21:23:48 +00:00
2018-09-17 07:07:02 +00:00
[testenv:formatting]
basepython = python3
deps =
2021-02-21 22:19:36 +00:00
-r {toxinidir}/requirements_test_min.txt
pre-commit==2.10.1
commands =
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-02-21 22:19:36 +00:00
pre-commit==2.10.1
2018-07-23 17:20:58 +00:00
commands =
pre-commit run mypy --all-files
2018-07-23 17:20:58 +00:00
2021-02-14 21:23:48 +00:00
[testenv]
setenv =
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
2021-02-21 22:19:36 +00:00
deps =
-r {toxinidir}/requirements_test.txt
commands =
; Run tests, ensuring all benchmark tests do not run
2021-02-21 22:19:36 +00:00
pytest --benchmark-disable {toxinidir}/tests/ {posargs:}
[testenv:spelling]
deps =
2021-02-21 22:19:36 +00:00
-r {toxinidir}/requirements_test.txt
commands =
2021-02-21 22:19:36 +00:00
pytest {toxinidir}/tests/ {posargs:} -k unittest_spelling
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
2021-02-14 21:23:48 +00:00
[testenv:benchmark]
deps =
2021-02-21 22:19:36 +00:00
-r {toxinidir}/requirements_test.txt
pygal
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:}
[testenv:profile_against_external]
2021-02-21 22:19:36 +00:00
setenv =
PYTEST_PROFILE_EXTERNAL = 1
deps =
2021-02-21 22:19:36 +00:00
-r {toxinidir}/requirements_test.txt
gprof2dot
commands =
2021-02-21 22:19:36 +00:00
pytest --exitfirst \
--profile-svg {toxinidir}/tests/profile/test_profile_against_externals.py