From 5f36f36f76f11730194571e90f03caf87b814300 Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Thu, 24 Mar 2005 15:43:32 +0000 Subject: [PATCH] Copied test to close command --- becommands/close.py | 1 + becommands/open.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/becommands/close.py b/becommands/close.py index 4f50b58..fba0b7b 100644 --- a/becommands/close.py +++ b/becommands/close.py @@ -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]) diff --git a/becommands/open.py b/becommands/open.py index dd50f93..82d739b 100644 --- a/becommands/open.py +++ b/becommands/open.py @@ -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" -- 2.26.2