From 28da7287b32e070034b8c093938effeedb2eb54e Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Sat, 1 Apr 2006 14:14:55 -0500 Subject: Fixed test suite for the unicode switch --- becommands/open.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'becommands/open.py') diff --git a/becommands/open.py b/becommands/open.py index 7923091..19b8910 100644 --- a/becommands/open.py +++ b/becommands/open.py @@ -23,10 +23,10 @@ def execute(args): >>> dir = tests.simple_bug_dir() >>> os.chdir(dir.dir) >>> dir.get_bug("b").status - 'closed' + u'closed' >>> execute(("b",)) >>> dir.get_bug("b").status - 'open' + u'open' >>> tests.clean_up() """ assert(len(args) == 1) -- cgit From 755256e88d53ab478b8a6f54280bd2d6d01bca59 Mon Sep 17 00:00:00 2001 From: Thomas Gerigk Date: Mon, 3 Apr 2006 20:05:58 +0200 Subject: added help to 'open'. (errhh... what is the status of a new bug?) --- becommands/open.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'becommands/open.py') diff --git a/becommands/open.py b/becommands/open.py index 19b8910..89067f8 100644 --- a/becommands/open.py +++ b/becommands/open.py @@ -29,7 +29,19 @@ def execute(args): u'open' >>> tests.clean_up() """ + options, args = get_parser().parse_args(args) assert(len(args) == 1) bug = cmdutil.get_bug(args[0]) bug.status = "open" bug.save() + +def get_parser(): + parser = cmdutil.CmdOptionParser("be open BUG-ID") + return parser + +longhelp=""" +Mark a bug as 'open'. +""" + +def help(): + return get_parser().help_str() + longhelp -- cgit From 5d75c1f4b7362ef184276f781346e69c34bd4874 Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Tue, 4 Apr 2006 19:52:25 -0400 Subject: Fixed tests to use lists, so that optparse can mangle them --- becommands/open.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'becommands/open.py') diff --git a/becommands/open.py b/becommands/open.py index 89067f8..d93eb61 100644 --- a/becommands/open.py +++ b/becommands/open.py @@ -24,7 +24,7 @@ def execute(args): >>> os.chdir(dir.dir) >>> dir.get_bug("b").status u'closed' - >>> execute(("b",)) + >>> execute(["b",]) >>> dir.get_bug("b").status u'open' >>> tests.clean_up() -- cgit