Update tox to generate docs & code coverage output

Change-Id: If4991deb68889d47e9530f56b008d005495b070c
This commit is contained in:
Ramy Asselin 2015-02-19 10:56:04 -08:00
parent 95f4cf660c
commit 92a9540a21
3 changed files with 13 additions and 1 deletions

View File

@ -44,3 +44,4 @@ Changes in Version 1.0.4
* Added new API
- Get API Version
* Fixed PEP8 violations
* Added tox environments to run tests with code coverage and to generate the documentation

View File

@ -4,3 +4,5 @@ flask
Werkzeug
flake8 # Used by tox
coverage
sphinx

11
tox.ini
View File

@ -1,7 +1,7 @@
[tox]
minversion = 1.6
skipdist = True
envlist = py27, pep8
envlist = py27,pep8,cover
[testenv]
setenv = VIRTUAL_ENV={envdir}
@ -13,6 +13,15 @@ deps = -r{toxinidir}/requirements.txt
commands =
nosetests --tc-file={toxinidir}/test/config.ini -v
[testenv:cover]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
nosetests --with-coverage --cover-package=hplefthandclient --cover-html --tc-file={toxinidir}/test/config.ini -v
[testenv:docs]
commands = sphinx-build -b html docs docs/html
[testenv:pep8]
commands =
flake8 {posargs} hplefthandclient test