~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

Merge bzr.dev into cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        """See BzrBranchFormat.get_format_string()."""
124
124
        return "Sample branch format."
125
125
 
126
 
    def initialize(self, a_bzrdir):
 
126
    def initialize(self, a_bzrdir, name=None):
127
127
        """Format 4 branches cannot be created."""
128
 
        t = a_bzrdir.get_branch_transport(self)
 
128
        t = a_bzrdir.get_branch_transport(self, name=name)
129
129
        t.put_bytes('format', self.get_format_string())
130
130
        return 'A branch'
131
131
 
132
132
    def is_supported(self):
133
133
        return False
134
134
 
135
 
    def open(self, transport, _found=False, ignore_fallbacks=False):
 
135
    def open(self, transport, name=None, _found=False, ignore_fallbacks=False):
136
136
        return "opened branch."
137
137
 
138
138
 
438
438
        t.mkdir('branch')
439
439
        branch_dir = bzrdirformat.initialize(self.get_url('branch'))
440
440
        made_branch = _mod_branch.BranchReferenceFormat().initialize(
441
 
            branch_dir, target_branch)
 
441
            branch_dir, target_branch=target_branch)
442
442
        self.assertEqual(made_branch.base, target_branch.base)
443
443
        opened_branch = branch_dir.open_branch()
444
444
        self.assertEqual(opened_branch.base, target_branch.base)