From 9fa2cfee9d182eefe918c0303c7966667d9673c9 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 10 Feb 2014 18:03:25 -0800 Subject: Replace incorrect import of generic test runner w/ custom task --- tasks.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index c7164158..e402599e 100644 --- a/tasks.py +++ b/tasks.py @@ -1,7 +1,7 @@ from os.path import join -from invoke import Collection -from invocations import docs as _docs, testing +from invoke import Collection, task +from invocations import docs as _docs d = 'sites' @@ -20,4 +20,11 @@ www = Collection.from_module(_docs, name='www', config={ 'sphinx.target': join(path, '_build'), }) -ns = Collection(testing.test, docs=docs, www=www) + +# Until we move to spec-based testing +@task +def test(ctx): + ctx.run("python test.py --verbose") + + +ns = Collection(test, docs=docs, www=www) -- cgit v1.2.3 From 1d87a0ceb9b6689e3969cc2b528f842b51e68f88 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 10 Feb 2014 18:21:29 -0800 Subject: Herp and a derp --- tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index e402599e..79cb94f0 100644 --- a/tasks.py +++ b/tasks.py @@ -1,6 +1,6 @@ from os.path import join -from invoke import Collection, task +from invoke import Collection, ctask as task from invocations import docs as _docs -- cgit v1.2.3 From 2d3b13e91705a2940f8af0c3d363190bee85ea0d Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 11 Feb 2014 09:31:43 -0800 Subject: Add coverage command as Invoke task --- .gitignore | 1 + .travis.yml | 2 +- tasks.py | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'tasks.py') diff --git a/.gitignore b/.gitignore index 9e1febf3..e149bb8c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ test.log docs/ !sites/docs _build +.coverage diff --git a/.travis.yml b/.travis.yml index df7c225a..97165c47 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ install: - pip install -r dev-requirements.txt script: # Main tests, with coverage! - - coverage run --source=paramiko test.py --verbose + - invoke coverage # Ensure documentation & invoke pipeline run OK. # Run 'docs' first since its objects.inv is referred to by 'www'. # Also force warnings to be errors since most of them tend to be actual diff --git a/tasks.py b/tasks.py index 79cb94f0..f8f4017d 100644 --- a/tasks.py +++ b/tasks.py @@ -26,5 +26,9 @@ www = Collection.from_module(_docs, name='www', config={ def test(ctx): ctx.run("python test.py --verbose") +@task +def coverage(ctx): + ctx.run("coverage run --source=paramiko test.py --verbose") + -ns = Collection(test, docs=docs, www=www) +ns = Collection(test, coverage, docs=docs, www=www) -- cgit v1.2.3