This converts the testing infrastructure to tox for both locally testing and travis. This is nearly equivalent to the previous testing with the only exception that linting fails with the first tool to fail and won't process all of them. Slightly tricky thing is that tox resets *all* of the environment for it's subprocess runs by default. A couple of the dependencies we have will not install in non UTF8 locales: temper-python & XBee.
29 lines
No EOL
753 B
INI
29 lines
No EOL
753 B
INI
[tox]
|
|
envlist = py34, py35, lint, requirements
|
|
skip_missing_interpreters = True
|
|
|
|
[testenv]
|
|
setenv =
|
|
; 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.
|
|
LANG=en_US.UTF-8
|
|
PYTHONPATH = {toxinidir}:{toxinidir}/homeassistant
|
|
commands =
|
|
py.test -v --timeout=30 --cov --cov-report= {posargs}
|
|
deps =
|
|
-r{toxinidir}/requirements_all.txt
|
|
-r{toxinidir}/requirements_test.txt
|
|
|
|
[testenv:lint]
|
|
basepython = python3
|
|
commands =
|
|
flake8
|
|
pylint homeassistant
|
|
|
|
[testenv:requirements]
|
|
basepython = python3
|
|
deps =
|
|
commands =
|
|
python script/gen_requirements_all.py validate |