From 9d0e5329c84d5cbb026b87bf6aba6050832b184e Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Thu, 24 Mar 2005 15:47:27 +0000 Subject: [PATCH] Added tests for 'target' --- becommands/target.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/becommands/target.py b/becommands/target.py index f9ab81b..57e69ef 100644 --- a/becommands/target.py +++ b/becommands/target.py @@ -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() -- 2.26.2