aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/target.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-03-24 15:47:27 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-03-24 15:47:27 +0000
commit9d0e5329c84d5cbb026b87bf6aba6050832b184e (patch)
treea03313265829e5cf53eefc1bdf203ebcf2d5700a /becommands/target.py
parent5f36f36f76f11730194571e90f03caf87b814300 (diff)
downloadbugseverywhere-9d0e5329c84d5cbb026b87bf6aba6050832b184e.tar.gz
Added tests for 'target'
Diffstat (limited to 'becommands/target.py')
-rw-r--r--becommands/target.py15
1 files changed, 15 insertions, 0 deletions
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()