2016-02-13 19:56:32 -05:00
|
|
|
[tox]
|
2018-08-06 01:51:37 -07:00
|
|
|
envlist = py35, py36, py37, py38, lint, pylint, typing, cov
|
2016-02-13 19:56:32 -05:00
|
|
|
skip_missing_interpreters = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
setenv =
|
2017-02-01 04:30:53 +01:00
|
|
|
PYTHONPATH = {toxinidir}:{toxinidir}/homeassistant
|
2016-02-13 19:56:32 -05:00
|
|
|
; both temper-python and XBee modules have utf8 in their README files
|
|
|
|
; which get read in from setup.py. If we don't force our locale to a
|
|
|
|
; utf8 one, tox's env is reset. And the install of these 2 packages
|
2018-08-06 01:51:37 -07:00
|
|
|
; fail.
|
|
|
|
whitelist_externals = /usr/bin/env
|
|
|
|
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
|
|
|
|
commands =
|
|
|
|
pytest --timeout=9 --duration=10 {posargs}
|
2018-09-25 20:47:51 +02:00
|
|
|
{toxinidir}/script/check_dirty
|
2018-08-06 01:51:37 -07:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_test_all.txt
|
|
|
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
|
|
|
|
|
|
|
[testenv:cov]
|
|
|
|
basepython = {env:PYTHON3_PATH:python3}
|
|
|
|
setenv =
|
|
|
|
PYTHONPATH = {toxinidir}:{toxinidir}/homeassistant
|
|
|
|
; both temper-python and XBee modules have utf8 in their README files
|
|
|
|
; which get read in from setup.py. If we don't force our locale to a
|
|
|
|
; utf8 one, tox's env is reset. And the install of these 2 packages
|
2016-02-13 19:56:32 -05:00
|
|
|
; fail.
|
2017-05-07 16:55:22 -07:00
|
|
|
whitelist_externals = /usr/bin/env
|
|
|
|
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
|
2016-02-13 19:56:32 -05:00
|
|
|
commands =
|
2018-05-13 12:11:55 +02:00
|
|
|
pytest --timeout=9 --duration=10 --cov --cov-report= {posargs}
|
2018-09-25 20:47:51 +02:00
|
|
|
{toxinidir}/script/check_dirty
|
2016-02-13 19:56:32 -05:00
|
|
|
deps =
|
2017-05-06 22:37:31 -07:00
|
|
|
-r{toxinidir}/requirements_test_all.txt
|
2017-08-04 23:06:10 -07:00
|
|
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
2016-02-13 19:56:32 -05:00
|
|
|
|
2017-11-19 17:39:24 -08:00
|
|
|
[testenv:pylint]
|
2017-12-20 02:50:31 -08:00
|
|
|
basepython = {env:PYTHON3_PATH:python3}
|
2016-02-15 10:00:46 +00:00
|
|
|
ignore_errors = True
|
2017-05-06 22:37:31 -07:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_all.txt
|
|
|
|
-r{toxinidir}/requirements_test.txt
|
2017-08-04 23:06:10 -07:00
|
|
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
2016-02-13 19:56:32 -05:00
|
|
|
commands =
|
2018-07-02 12:47:20 +03:00
|
|
|
pylint {posargs} homeassistant
|
2016-02-13 19:56:32 -05:00
|
|
|
|
2017-11-19 17:39:24 -08:00
|
|
|
[testenv:lint]
|
2017-12-20 02:50:31 -08:00
|
|
|
basepython = {env:PYTHON3_PATH:python3}
|
2016-02-13 19:56:32 -05:00
|
|
|
deps =
|
2017-11-19 17:39:24 -08:00
|
|
|
-r{toxinidir}/requirements_test.txt
|
2016-02-13 19:56:32 -05:00
|
|
|
commands =
|
2016-02-15 10:00:46 +00:00
|
|
|
python script/gen_requirements_all.py validate
|
2018-09-19 16:48:04 +03:00
|
|
|
flake8 {posargs}
|
|
|
|
pydocstyle {posargs:homeassistant tests}
|
2016-07-21 00:38:52 -05:00
|
|
|
|
|
|
|
[testenv:typing]
|
2017-12-20 02:50:31 -08:00
|
|
|
basepython = {env:PYTHON3_PATH:python3}
|
2018-05-13 00:44:53 +03:00
|
|
|
whitelist_externals=/bin/bash
|
2016-07-21 23:54:25 -07:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements_test.txt
|
2016-07-21 00:38:52 -05:00
|
|
|
commands =
|
2018-11-11 18:39:50 +02:00
|
|
|
/bin/bash -c 'mypy homeassistant/*.py homeassistant/{auth,util}/ homeassistant/helpers/{__init__,deprecation,dispatcher,entity_values,entityfilter,icon,intent,json,location,signal,state,sun,temperature,translation,typing}.py'
|