~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(jelmer) Raise NotBranchError from BzrDir.destroy_branch. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
        bzrdir.create_branch()
160
160
        bzrdir.open_branch()
161
161
 
 
162
    def test_destroy_branch_no_branch(self):
 
163
        branch = self.make_repository('branch')
 
164
        bzrdir = branch.bzrdir
 
165
        try:
 
166
            self.assertRaises(errors.NotBranchError, bzrdir.destroy_branch)
 
167
        except (errors.UnsupportedOperation, errors.TransportNotPossible):
 
168
            raise TestNotApplicable('Format does not support destroying branch')
 
169
 
162
170
    def test_destroy_repository(self):
163
171
        repo = self.make_repository('repository')
164
172
        bzrdir = repo.bzrdir