forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
63 lines (58 loc) · 2.14 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[tox]
envlist = py35, py36, py37, py38, lint, pylint, typing, cov
skip_missing_interpreters = True
[testenv]
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
; 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}
{toxinidir}/script/check_dirty
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
; 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 --cov --cov-report= {posargs}
{toxinidir}/script/check_dirty
deps =
-r{toxinidir}/requirements_test_all.txt
-c{toxinidir}/homeassistant/package_constraints.txt
[testenv:pylint]
basepython = {env:PYTHON3_PATH:python3}
ignore_errors = True
deps =
-r{toxinidir}/requirements_all.txt
-r{toxinidir}/requirements_test.txt
-c{toxinidir}/homeassistant/package_constraints.txt
commands =
pylint {posargs} homeassistant
[testenv:lint]
basepython = {env:PYTHON3_PATH:python3}
deps =
-r{toxinidir}/requirements_test.txt
commands =
python script/gen_requirements_all.py validate
flake8 {posargs}
pydocstyle {posargs:homeassistant tests}
[testenv:typing]
basepython = {env:PYTHON3_PATH:python3}
whitelist_externals=/bin/bash
deps =
-r{toxinidir}/requirements_test.txt
commands =
/bin/bash -c 'mypy homeassistant/*.py homeassistant/{auth,util}/ homeassistant/helpers/{icon,intent,json,location,state,translation,typing}.py'