diff --git a/.gitignore b/.gitignore index 437c9f0bd..e1dca3a57 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ build/ dist/ venv/ .tox/ +.coverage m3 diff --git a/setup.cfg b/setup.cfg index a848a847e..2b9124c06 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,3 +3,8 @@ zip_ok = false [aliases] dev = develop easy_install letsencrypt[testing] + +[nosetests] +nocapture=1 +cover-package=letsencrypt +cover-erase=1 diff --git a/setup.py b/setup.py index 4352b0c25..93e22b4d9 100755 --- a/setup.py +++ b/setup.py @@ -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, }, diff --git a/tox.ini b/tox.ini index 9b6ca773a..75941366e 100644 --- a/tox.ini +++ b/tox.ini @@ -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