~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-26 13:41:53 UTC
  • Revision ID: mbp@sourcefrog.net-20050326134153-3fd9d2c0ee5a06ce
- add test case for ignore files

Show diffs side-by-side

added added

removed removed

Lines of Context:
767
767
    >>> isdir(bd)
768
768
    False
769
769
    """
770
 
    def __init__(self, files = []):
 
770
    def __init__(self, files=[], dirs=[]):
771
771
        """Make a test branch.
772
772
 
773
773
        This creates a temporary directory and runs init-tree in it.
775
775
        If any files are listed, they are created in the working copy.
776
776
        """
777
777
        Branch.__init__(self, tempfile.mkdtemp(), init=True)
 
778
        for d in dirs:
 
779
            os.mkdir(self.abspath(d))
 
780
            
778
781
        for f in files:
779
782
            file(os.path.join(self.base, f), 'w').write('content of %s' % f)
780
783