From: Aaron Bentley Date: Thu, 24 Mar 2005 15:57:32 +0000 (+0000) Subject: Added tests for severity X-Git-Tag: 1.0.0~310 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=57d6ed2b544a1663657a9fcf29f5f089120e870e;p=be.git Added tests for severity --- diff --git a/becommands/severity.py b/becommands/severity.py index 0b35c50..6c35a26 100644 --- a/becommands/severity.py +++ b/becommands/severity.py @@ -4,6 +4,21 @@ from libbe import cmdutil __desc__ = __doc__ def execute(args): + """ + >>> from libbe import tests + >>> import os + >>> dir = tests.simple_bug_dir() + >>> os.chdir(dir.dir) + >>> execute(("a",)) + minor + >>> execute(("a", "wishlist")) + >>> execute(("a",)) + wishlist + >>> execute(("a", "none")) + Traceback (most recent call last): + UserError: Invalid severity level: none + >>> tests.clean_up() + """ assert(len(args) in (0, 1, 2)) if len(args) == 0: print help()