Added tests for 'target'
authorAaron Bentley <abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 15:47:27 +0000 (15:47 +0000)
committerAaron Bentley <abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 15:47:27 +0000 (15:47 +0000)
becommands/target.py

index f9ab81b81fd4920e95f485ccbeb4b0a981cbcf29..57e69ef800f6e07e4d90a7ed29183806bf22521a 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",))
+    No target assigned.
+    >>> execute(("a", "tomorrow"))
+    >>> execute(("a",))
+    tomorrow
+    >>> execute(("a", "none"))
+    >>> execute(("a",))
+    No target assigned.
+    >>> tests.clean_up()
+    """
     assert(len(args) in (0, 1, 2))
     if len(args) == 0:
         print help()