diff --git a/docs/changelog.rst b/docs/changelog.rst index e0b20ba..c875680 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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 diff --git a/test-requirements.txt b/test-requirements.txt index fdb4d59..12f7bc9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,3 +4,5 @@ flask Werkzeug flake8 # Used by tox +coverage +sphinx diff --git a/tox.ini b/tox.ini index e3c34fc..9776c9e 100644 --- a/tox.ini +++ b/tox.ini @@ -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