~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-04-02 01:44:26 UTC
  • mfrom: (6518 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120402014426-0o5qtysohyl006b2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
 
138
138
    def test_branch_name_with_slash(self):
139
139
        repo = self.make_repository('branch-1')
140
 
        target_branch = repo.bzrdir.create_branch(name='foo/bar')
 
140
        try:
 
141
            target_branch = repo.bzrdir.create_branch(name='foo/bar')
 
142
        except errors.InvalidBranchName:
 
143
            raise tests.TestNotApplicable(
 
144
                "format does not support branches with / in their name")
141
145
        self.assertEqual(['foo/bar'], repo.bzrdir.get_branches().keys())
142
146
        self.assertEqual(
143
147
            target_branch.base, repo.bzrdir.open_branch(name='foo/bar').base)
145
149
    def test_branch_reference(self):
146
150
        referenced = self.make_branch('referenced')
147
151
        repo = self.make_repository('repo')
148
 
        repo.bzrdir.set_branch_reference(referenced, name='foo')
 
152
        try:
 
153
            repo.bzrdir.set_branch_reference(referenced, name='foo')
 
154
        except errors.IncompatibleFormat:
 
155
            raise tests.TestNotApplicable(
 
156
                'Control dir does not support creating branch references.')
149
157
        self.assertEquals(referenced.base,
150
158
            repo.bzrdir.get_branch_reference('foo'))