summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2015-11-01 15:09:12 -0800
committerJeff Forcier <jeff@bitprophet.org>2015-11-02 12:48:04 -0800
commitce2df91a790aedcd0ec08f3526141cd01c63560d (patch)
tree8ab503e899baee49d6b1997cbeac55cc099ad10a /tasks.py
parent663e4ca4a0363670d6dd72a512e936d0c47457c0 (diff)
downloadparamiko-ce2df91a790aedcd0ec08f3526141cd01c63560d.tar.gz
Allow specifying test.py flags in 'inv test'
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index 2aeea0da..05654d3b 100644
--- a/tasks.py
+++ b/tasks.py
@@ -9,8 +9,14 @@ from invocations.packaging import publish
# Until we move to spec-based testing
@task
-def test(ctx):
- ctx.run("python test.py --verbose", pty=True)
+def test(ctx, coverage=False, flags=""):
+ if "--verbose" not in flags.split():
+ flags += " --verbose"
+ runner = "python"
+ if coverage:
+ runner = "coverage run --source=paramiko"
+ ctx.run("{0} test.py {1}".format(runner, flags), pty=True)
+
@task
def coverage(ctx):