Added tests for severity
authorAaron Bentley <abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 15:57:32 +0000 (15:57 +0000)
committerAaron Bentley <abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 15:57:32 +0000 (15:57 +0000)
becommands/severity.py

index 0b35c50f6dfc7f69abb3790fa08a6a804971b459..6c35a2632dd1f13a9614027d7f71394644fa391e 100644 (file)
@@ -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()