/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2007-09-24 15:01:26 UTC
  • mfrom: (2853 +trunk)
  • mto: (2885.1.1 140432)
  • mto: This revision was merged to the branch mainline in revision 2886.
  • Revision ID: v.ladeuil+lp@free.fr-20070924150126-nll7i0385kisklyj
Merge bzr.dev

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.