~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_controldir_colo/test_unsupported.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib import (
24
24
    errors,
25
25
    tests,
26
 
    transport,
27
26
    )
28
27
from bzrlib.tests import (
29
28
    per_controldir,
40
39
            # they may not be initializable.
41
40
            raise tests.TestNotApplicable('Control dir format not supported')
42
41
        t = self.get_transport()
43
 
        made_control = self.bzrdir_format.initialize(t.base)
 
42
        try:
 
43
            made_control = self.make_bzrdir('.', format=self.bzrdir_format)
 
44
        except errors.UninitializableFormat:
 
45
            raise tests.TestNotApplicable('Control dir format not initializable')
 
46
        self.assertEquals(made_control._format, self.bzrdir_format)
44
47
        made_repo = made_control.create_repository()
45
48
        return made_control
46
49
 
66
69
        made_control = self.make_bzrdir_with_repo()
67
70
        self.assertRaises(errors.NoColocatedBranchSupport,
68
71
            made_control.get_branch_reference, "colo")
 
72
 
 
73
    def test_set_branch_reference(self):
 
74
        referenced = self.make_branch('referenced')
 
75
        made_control = self.make_bzrdir_with_repo()
 
76
        self.assertRaises(errors.NoColocatedBranchSupport,
 
77
            made_control.set_branch_reference, referenced, name="colo")
 
78
 
 
79
    def test_get_branches(self):
 
80
        made_control = self.make_bzrdir_with_repo()
 
81
        made_control.create_branch()
 
82
        self.assertEqual(made_control.get_branches().keys(),
 
83
                         [""])