diff options
author | Christian Heimes <cheimes@redhat.com> | 2015-07-07 12:47:16 +0200 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-07-08 14:43:14 -0400 |
commit | 5f85b79d56f338ef77ef7ff719a73815435fdf34 (patch) | |
tree | 400a5fd3759c4cfd2812c2251bda64b2bc014ac2 /tox.ini | |
parent | 3b135033f4d70c59a9b6880c13b38238ff593081 (diff) | |
download | custodia-5f85b79d56f338ef77ef7ff719a73815435fdf34.tar.gz custodia-5f85b79d56f338ef77ef7ff719a73815435fdf34.tar.xz custodia-5f85b79d56f338ef77ef7ff719a73815435fdf34.zip |
Automatic testing with py.test, coverage and tox
The patch provides test automation with tox. Just run 'tox' in the
source root to create virtual envs, install custodia from the sources
and run the tests on Python 2.7 and 3.4.
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Closes: #4
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 60 |
1 files changed, 60 insertions, 0 deletions
@@ -0,0 +1,60 @@ +[tox] +envlist = py27,py34,doc,sphinx + +[testenv] +deps = + pytest + coverage + -r{toxinidir}/requirements.txt + cryptography +commands = + coverage run -m pytest --capture=no --strict {posargs} + coverage report -m + +[testenv:pep8] +basepython = python2.7 +deps = + flake8 + flake8-import-order + pep8-naming +commands = + flake8 {posargs} + +[testenv:py3pep8] +basepython = python3.4 +deps = + flake8 + flake8-import-order + pep8-naming +commands = + flake8 {posargs} + +[testenv:doc] +deps = + doc8 + docutils + markdown +basepython = python2.7 +commands = + doc8 --allow-long-titles README + python setup.py check --restructuredtext --metadata --strict + markdown_py README.md -f {toxworkdir}/README.md.html + markdown_py API.md -f {toxworkdir}/API.md.html + +[testenv:sphinx] +basepython = python2.7 +changedir = docs/source +deps = + sphinx < 1.3.0 +commands = + sphinx-build -v -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html + +[pytest] +python_files = tests/*.py custodia/*.py + +[flake8] +exclude = .tox,*.egg,dist,build,docs/source +show-source = true +max-line-length = 79 +ignore = N802 +application-import-names = custodia |