diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2015-11-01 15:09:12 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2015-11-02 12:48:04 -0800 |
commit | ce2df91a790aedcd0ec08f3526141cd01c63560d (patch) | |
tree | 8ab503e899baee49d6b1997cbeac55cc099ad10a /tasks.py | |
parent | 663e4ca4a0363670d6dd72a512e936d0c47457c0 (diff) |
Allow specifying test.py flags in 'inv test'
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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): |