From: Aaron Bentley Date: Thu, 24 Mar 2005 15:47:27 +0000 (+0000) Subject: Added tests for 'target' X-Git-Tag: 1.0.0~311 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9d0e5329c84d5cbb026b87bf6aba6050832b184e;p=be.git Added tests for 'target' --- 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()