Merge pull request #89 from kuba/tests-setup

Improve tests setup, incuding coverage.
This commit is contained in:
James Kasten 2014-11-27 18:58:05 -08:00
commit 6e01530684
4 changed files with 20 additions and 7 deletions

1
.gitignore vendored
View file

@ -4,4 +4,5 @@ build/
dist/
venv/
.tox/
.coverage
m3

View file

@ -3,3 +3,8 @@ zip_ok = false
[aliases]
dev = develop easy_install letsencrypt[testing]
[nosetests]
nocapture=1
cover-package=letsencrypt
cover-erase=1

View file

@ -15,6 +15,7 @@ install_requires = [
testing_extras = [
'coverage',
'nose',
'nosexcover',
'pylint',
'tox',
]
@ -33,6 +34,7 @@ setup(
],
install_requires=install_requires,
tests_require=install_requires,
test_suite='letsencrypt',
extras_require={
'testing': testing_extras,
},

19
tox.ini
View file

@ -4,14 +4,19 @@
# and then run "tox" from this directory.
[tox]
envlist = py26, py27, lint
envlist = py26,py27,cover,lint
[testenv]
commands = nosetests
deps =
nose
commands =
python setup.py dev
python setup.py test -q # -q does not suppress errors
[testenv:cover]
commands =
python setup.py dev
python setup.py nosetests --with-coverage --cover-min-percentage=100
[testenv:lint]
commands = pylint letsencrypt
deps =
pylint
commands =
python setup.py dev
pylint letsencrypt