From 3f9a708789e9c773de019953e32ec56fe5342488 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 20:13:21 +0100 Subject: [PATCH 1/8] tox.ini using setup.py dev --- tox.ini | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tox.ini b/tox.ini index 9b6ca773a..43aeaea4c 100644 --- a/tox.ini +++ b/tox.ini @@ -4,14 +4,14 @@ # and then run "tox" from this directory. [tox] -envlist = py26, py27, lint +envlist = py26,py27,lint [testenv] -commands = nosetests -deps = - nose +commands = + python setup.py dev + nosetests [testenv:lint] -commands = pylint letsencrypt -deps = - pylint +commands = + python setup.py dev + pylint letsencrypt From c2413ba5426f3f409d203af862cba4f3d3afd32b Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 20:24:50 +0100 Subject: [PATCH 2/8] setuptools test_suite --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 4352b0c25..02a548f3e 100755 --- a/setup.py +++ b/setup.py @@ -33,6 +33,7 @@ setup( ], install_requires=install_requires, tests_require=install_requires, + test_suite='letsencrypt', extras_require={ 'testing': testing_extras, }, From f62ab0e351e23169c28f746aa6055d2b32b2b033 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 20:26:30 +0100 Subject: [PATCH 3/8] tox.ini uses setup.py test -q --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 43aeaea4c..7a7db6a7c 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ envlist = py26,py27,lint [testenv] commands = python setup.py dev - nosetests + python setup.py test -q # -q does not suppress errors [testenv:lint] commands = From 9d5ab7dbccb62b42778a40d5602f035588a71b3f Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 20:30:56 +0100 Subject: [PATCH 4/8] Test coverage --- setup.py | 1 + tox.ini | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 02a548f3e..93e22b4d9 100755 --- a/setup.py +++ b/setup.py @@ -15,6 +15,7 @@ install_requires = [ testing_extras = [ 'coverage', 'nose', + 'nosexcover', 'pylint', 'tox', ] diff --git a/tox.ini b/tox.ini index 7a7db6a7c..114c3868b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,13 +4,18 @@ # and then run "tox" from this directory. [tox] -envlist = py26,py27,lint +envlist = py26,py27,cover,lint [testenv] 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-xunit --with-xcoverage --cover-min-percentage=100 + [testenv:lint] commands = python setup.py dev From dfd7e142c143e8f3f92541dfd02349592caf4de3 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 20:56:35 +0100 Subject: [PATCH 5/8] Do not use xunit. coverage instead of xcoverage. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 114c3868b..75941366e 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ commands = [testenv:cover] commands = python setup.py dev - python setup.py nosetests --with-xunit --with-xcoverage --cover-min-percentage=100 + python setup.py nosetests --with-coverage --cover-min-percentage=100 [testenv:lint] commands = From 93291feb58940d54b2b8d0cefdc02e80f5b5bfed Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 20:57:24 +0100 Subject: [PATCH 6/8] Ignore .coverage --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 437c9f0bd..d01ebf0fc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ build/ dist/ venv/ .tox/ +.coverage/ m3 From f2c1c30ac4f4916f497c6a3ae51d1b6f9323c4db Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 21:00:07 +0100 Subject: [PATCH 7/8] Restrict nosetests to our package --- setup.cfg | 5 +++++ 1 file changed, 5 insertions(+) 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 From d40a7acf8a0241eebaf317e31783ad864f5fdc13 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 27 Nov 2014 22:49:15 +0100 Subject: [PATCH 8/8] gitignore: .coverage is a file --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d01ebf0fc..e1dca3a57 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ build/ dist/ venv/ .tox/ -.coverage/ +.coverage m3