~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_branch.py

(jelmer) Several more fixes for running the tests against foreign format
 plugins. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
442
442
        tree_a = self.make_branch_and_tree('a')
443
443
        rev_id = tree_a.commit('put some content in the branch')
444
444
        # open the branch via a readonly transport
445
 
        source_branch = _mod_branch.Branch.open(self.get_readonly_url(
446
 
            urlutils.basename(tree_a.branch.base)))
 
445
        url = self.get_readonly_url(urlutils.basename(tree_a.branch.base))
 
446
        t = transport.get_transport_from_url(url)
 
447
        if not tree_a.branch.bzrdir._format.supports_transport(t):
 
448
            raise tests.TestNotApplicable("format does not support transport")
 
449
        source_branch = _mod_branch.Branch.open(url)
447
450
        # sanity check that the test will be valid
448
451
        self.assertRaises((errors.LockError, errors.TransportNotPossible),
449
452
            source_branch.lock_write)