Copied test to close command
authorAaron Bentley <abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 15:43:32 +0000 (15:43 +0000)
committerAaron Bentley <abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 15:43:32 +0000 (15:43 +0000)
becommands/close.py
becommands/open.py

index 4f50b58efa8d2ef49b6f19e60c71c8a0b8efd08f..fba0b7b3528abd1dc037d2c97cb6c7d70950ee85 100644 (file)
@@ -11,6 +11,7 @@ def execute(args):
     >>> execute(("a",))
     >>> dir.get_bug("a").status
     'closed'
+    >>> tests.clean_up()
     """
     assert(len(args) == 1)
     bug = cmdutil.get_bug(args[0])
index dd50f93288392bb4905451adc04729f5cd0c57bd..82d739b89efbc22bb0d4dd430af889caa52c94d6 100644 (file)
@@ -1,6 +1,18 @@
 """Re-open a bug"""
 from libbe import cmdutil
 def execute(args):
+    """
+    >>> from libbe import tests
+    >>> import os
+    >>> dir = tests.simple_bug_dir()
+    >>> os.chdir(dir.dir)
+    >>> dir.get_bug("b").status
+    'closed'
+    >>> execute(("b",))
+    >>> dir.get_bug("b").status
+    'open'
+    >>> tests.clean_up()
+    """
     assert(len(args) == 1)
     bug = cmdutil.get_bug(args[0])
     bug.status = "open"