From 57d6ed2b544a1663657a9fcf29f5f089120e870e Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Thu, 24 Mar 2005 15:57:32 +0000 Subject: [PATCH] Added tests for severity --- becommands/severity.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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() -- 2.26.2