2016-02-14 01:56:32 +01:00
|
|
|
[tox]
|
2018-08-06 10:51:37 +02:00
|
|
|
envlist = py35, py36, py37, py38, lint, pylint, typing, cov
|
2016-02-14 01:56:32 +01:00
|
|
|
skip_missing_interpreters = True
|
|
|
|
|
|
|
|
[testenv]
|
2019-03-04 12:36:50 +01:00
|
|
|
basepython = {env:PYTHON3_PATH:python3}
|
2018-08-06 10:51:37 +02:00
|
|
|
commands =
|
2019-03-07 07:27:46 +01:00
|
|
|
pytest --timeout=9 --duration=10 -qq -o console_output_style=count -p no:sugar {posargs}
|
2018-09-25 20:47:51 +02:00
|
|
|
{toxinidir}/script/check_dirty
|
2018-08-06 10:51:37 +02:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_test_all.txt
|
|
|
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
|
|
|
|
|
|
|
[testenv:cov]
|
2016-02-14 01:56:32 +01:00
|
|
|
commands =
|
2019-03-07 07:27:46 +01:00
|
|
|
pytest --timeout=9 --duration=10 -qq -o console_output_style=count -p no:sugar --cov --cov-report= {posargs}
|
2018-09-25 20:47:51 +02:00
|
|
|
{toxinidir}/script/check_dirty
|
2016-02-14 01:56:32 +01:00
|
|
|
deps =
|
2017-05-07 07:37:31 +02:00
|
|
|
-r{toxinidir}/requirements_test_all.txt
|
2017-08-05 08:06:10 +02:00
|
|
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
2016-02-14 01:56:32 +01:00
|
|
|
|
2017-11-20 02:39:24 +01:00
|
|
|
[testenv:pylint]
|
2016-02-15 11:00:46 +01:00
|
|
|
ignore_errors = True
|
2017-05-07 07:37:31 +02:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_all.txt
|
|
|
|
-r{toxinidir}/requirements_test.txt
|
2017-08-05 08:06:10 +02:00
|
|
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
2016-02-14 01:56:32 +01:00
|
|
|
commands =
|
2018-07-02 11:47:20 +02:00
|
|
|
pylint {posargs} homeassistant
|
2016-02-14 01:56:32 +01:00
|
|
|
|
2017-11-20 02:39:24 +01:00
|
|
|
[testenv:lint]
|
2016-02-14 01:56:32 +01:00
|
|
|
deps =
|
2017-11-20 02:39:24 +01:00
|
|
|
-r{toxinidir}/requirements_test.txt
|
2016-02-14 01:56:32 +01:00
|
|
|
commands =
|
2019-03-04 12:36:50 +01:00
|
|
|
python script/gen_requirements_all.py validate
|
|
|
|
flake8 {posargs}
|
|
|
|
pydocstyle {posargs:homeassistant tests}
|
2016-07-21 07:38:52 +02:00
|
|
|
|
|
|
|
[testenv:typing]
|
2018-05-12 23:44:53 +02:00
|
|
|
whitelist_externals=/bin/bash
|
2016-07-22 08:54:25 +02:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_test.txt
|
2019-03-04 12:36:50 +01:00
|
|
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
2016-07-21 07:38:52 +02:00
|
|
|
commands =
|
2019-04-01 16:12:59 +02:00
|
|
|
/bin/bash -c 'TYPING_FILES=$(cat mypyrc); mypy $TYPING_FILES'
|