~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/codehosting/tests/helpers.py

  • Committer: jml at canonical
  • Date: 2007-10-15 23:01:30 UTC
  • mto: This revision was merged to the branch mainline in revision 5017.
  • Revision ID: jml@canonical.com-20071015230130-ttzrt47655747pye
Add docstrings and remove unnecessary sys.exit() call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
401
401
 
402
402
 
403
403
def make_bazaar_branch_and_tree(db_branch):
 
404
    """Make a dummy Bazaar branch and working tree from a database Branch."""
404
405
    assert db_branch.branch_type == BranchType.HOSTED, (
405
406
        "Can only create branches for HOSTED branches: %r"
406
407
        % db_branch)
418
419
 
419
420
 
420
421
def create_branch(branch_dir):
 
422
    """Create a dummy Bazaar branch at the given directory."""
421
423
    if not os.path.exists(branch_dir):
422
424
        os.makedirs(branch_dir)
423
425
    try: