diff options
author | Aaron Bentley <aaron.bentley@utoronto.ca> | 2005-03-24 06:03:04 +0000 |
---|---|---|
committer | Aaron Bentley <aaron.bentley@utoronto.ca> | 2005-03-24 06:03:04 +0000 |
commit | 37157407c121ca6cdfb4beb726adb49303bf929e (patch) | |
tree | ca0f84550040d02a4f4b23b9aa50f6e06f91cf55 /becommands | |
parent | fff94eaeaaf2c7b9d6c6b9ad559c779cbaa0c5da (diff) | |
download | bugseverywhere-37157407c121ca6cdfb4beb726adb49303bf929e.tar.gz |
Added tests for set-root
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/set_root.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/becommands/set_root.py b/becommands/set_root.py index ff7662a..87e4bda 100644 --- a/becommands/set_root.py +++ b/becommands/set_root.py @@ -2,6 +2,27 @@ from libbe import bugdir, cmdutil, rcs def execute(args): + """ + >>> from libbe import tests + >>> dir = tests.Dir() + >>> try: + ... bugdir.tree_root(dir.name) + ... except bugdir.NoBugDir, e: + ... True + True + >>> execute([dir.name]) + No revision control detected. + Directory initialized. + >>> bd = bugdir.tree_root(dir.name) + >>> bd.root = dir.name + >>> dir = tests.arch_dir() + >>> execute([dir.name+"/{arch}"]) + Using Arch for revision control. + Directory initialized. + >>> bd = bugdir.tree_root(dir.name+"/{arch}") + >>> bd.root = dir.name + >>> tests.clean_up() + """ if len(args) != 1: raise cmdutil.UserError("Please supply a directory path") dir_rcs = rcs.detect(args[0]) |