2016-02-14 00:56:32 +00:00
|
|
|
[tox]
|
2022-01-11 11:00:53 +00:00
|
|
|
envlist = py39, lint, pylint, typing, cov
|
2016-02-14 00:56:32 +00:00
|
|
|
skip_missing_interpreters = True
|
2020-09-30 15:07:59 +00:00
|
|
|
ignore_basepython_conflict = True
|
2022-03-14 16:38:40 +00:00
|
|
|
isolated_build = True
|
2016-02-14 00:56:32 +00:00
|
|
|
|
|
|
|
[testenv]
|
2019-03-04 11:36:50 +00:00
|
|
|
basepython = {env:PYTHON3_PATH:python3}
|
2021-02-16 22:26:41 +00:00
|
|
|
# pip version duplicated in homeassistant/package_constraints.txt
|
2022-05-23 09:58:19 +00:00
|
|
|
pip_version = pip>=21.0,<22.2
|
2022-02-07 14:12:04 +00:00
|
|
|
install_command = python -m pip install --use-deprecated legacy-resolver {opts} {packages}
|
2018-08-06 08:51:37 +00:00
|
|
|
commands =
|
2021-11-18 05:23:25 +00:00
|
|
|
{envpython} -X dev -m pytest --timeout=9 --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar {posargs}
|
2018-09-25 18:47:51 +00:00
|
|
|
{toxinidir}/script/check_dirty
|
2018-08-06 08:51:37 +00:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_test_all.txt
|
|
|
|
|
|
|
|
[testenv:cov]
|
2016-02-14 00:56:32 +00:00
|
|
|
commands =
|
2021-11-18 05:23:25 +00:00
|
|
|
{envpython} -X dev -m pytest --timeout=9 --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar --cov --cov-report= {posargs}
|
2018-09-25 18:47:51 +00:00
|
|
|
{toxinidir}/script/check_dirty
|
2016-02-14 00:56:32 +00:00
|
|
|
deps =
|
2017-05-07 05:37:31 +00:00
|
|
|
-r{toxinidir}/requirements_test_all.txt
|
2016-02-14 00:56:32 +00:00
|
|
|
|
2017-11-20 01:39:24 +00:00
|
|
|
[testenv:pylint]
|
2020-08-27 14:57:58 +00:00
|
|
|
skip_install = True
|
2016-02-15 10:00:46 +00:00
|
|
|
ignore_errors = True
|
2017-05-07 05:37:31 +00:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_all.txt
|
|
|
|
-r{toxinidir}/requirements_test.txt
|
2016-02-14 00:56:32 +00:00
|
|
|
commands =
|
2019-11-04 07:12:15 +00:00
|
|
|
pylint {env:PYLINT_ARGS:} {posargs} homeassistant
|
2016-02-14 00:56:32 +00:00
|
|
|
|
2017-11-20 01:39:24 +00:00
|
|
|
[testenv:lint]
|
2016-02-14 00:56:32 +00:00
|
|
|
deps =
|
2017-11-20 01:39:24 +00:00
|
|
|
-r{toxinidir}/requirements_test.txt
|
2016-02-14 00:56:32 +00:00
|
|
|
commands =
|
2019-04-25 04:30:46 +00:00
|
|
|
python -m script.gen_requirements_all validate
|
2020-04-19 15:43:49 +00:00
|
|
|
python -m script.hassfest --action validate
|
2020-01-31 16:33:00 +00:00
|
|
|
pre-commit run codespell {posargs: --all-files}
|
2019-10-18 19:20:27 +00:00
|
|
|
pre-commit run flake8 {posargs: --all-files}
|
2019-11-18 08:10:15 +00:00
|
|
|
pre-commit run bandit {posargs: --all-files}
|
2016-07-21 05:38:52 +00:00
|
|
|
|
|
|
|
[testenv:typing]
|
2016-07-22 06:54:25 +00:00
|
|
|
deps =
|
2021-03-30 15:18:29 +00:00
|
|
|
-r{toxinidir}/requirements_test_all.txt
|
2016-07-21 05:38:52 +00:00
|
|
|
commands =
|
2021-03-30 15:18:29 +00:00
|
|
|
mypy homeassistant
|