~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-17 14:29:23 UTC
  • mfrom: (2796.2.18 bzr.reconfigure)
  • Revision ID: pqm@pqm.ubuntu.com-20070917142923-f06edfgw1d0cvj4w
Add reconfigure command

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                          ChrootedTestCase,
48
48
                          TestCase,
49
49
                          TestCaseWithTransport,
 
50
                          TestNotApplicable,
50
51
                          TestSkipped,
51
52
                          )
52
53
from bzrlib.tests.bzrdir_implementations import TestCaseWithBzrDir
167
168
        self.failUnlessExists('tree/file')
168
169
        self.assertRaises(errors.NoWorkingTree, bzrdir.open_workingtree)
169
170
 
 
171
    def test_destroy_branch(self):
 
172
        branch = self.make_branch('branch')
 
173
        bzrdir = branch.bzrdir
 
174
        try:
 
175
            bzrdir.destroy_branch()
 
176
        except (errors.UnsupportedOperation, errors.TransportNotPossible):
 
177
            raise TestNotApplicable('Format does not support destroying tree')
 
178
        self.assertRaises(errors.NotBranchError, bzrdir.open_branch)
 
179
        bzrdir.create_branch()
 
180
        bzrdir.open_branch()
 
181
 
170
182
    def test_open_workingtree_raises_no_working_tree(self):
171
183
        """BzrDir.open_workingtree() should raise NoWorkingTree (rather than
172
184
        e.g. NotLocalUrl) if there is no working tree.