~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_controldir/test_controldir.py

(jelmer) More fixes for the interface tests when run against foreign tests.
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1148
1148
        self.assertIsInstance(made_branch, bzrlib.branch.Branch)
1149
1149
        self.assertEqual(made_control, made_branch.bzrdir)
1150
1150
 
 
1151
    def test_create_branch_append_revisions_only(self):
 
1152
        # a bzrdir can construct a branch and repository for itself.
 
1153
        if not self.bzrdir_format.is_supported():
 
1154
            # unsupported formats are not loopback testable
 
1155
            # because the default open will not open them and
 
1156
            # they may not be initializable.
 
1157
            return
 
1158
        t = self.get_transport()
 
1159
        made_control = self.bzrdir_format.initialize(t.base)
 
1160
        made_repo = made_control.create_repository()
 
1161
        try:
 
1162
            made_branch = made_control.create_branch(
 
1163
                append_revisions_only=True)
 
1164
        except errors.UpgradeRequired:
 
1165
            return
 
1166
        self.assertIsInstance(made_branch, bzrlib.branch.Branch)
 
1167
        self.assertEquals(True, made_branch.get_append_revisions_only())
 
1168
        self.assertEqual(made_control, made_branch.bzrdir)
 
1169
 
1151
1170
    def test_open_branch(self):
1152
1171
        if not self.bzrdir_format.is_supported():
1153
1172
            # unsupported formats are not loopback testable