~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf_ui.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-13 16:25:08 UTC
  • mfrom: (5954.4.12 merge-into-empty)
  • Revision ID: pqm@pqm.ubuntu.com-20110613162508-yyvo3qc06t9d2wwf
Support merging into empty tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
311
311
                                from_revision=revision.NULL_REVISION)
312
312
        tree1.commit('Replaced root entry')
313
313
        # This is essentially assertNotRaises(InconsistentDelta)
314
 
        self.expectFailure('Cannot shelve replacing a root entry',
315
 
                           self.assertRaises, AssertionError,
316
 
                           self.assertRaises, errors.InconsistentDelta,
317
 
                           self.shelve_all, tree1, rev2)
 
314
        # With testtools 0.99, it can be rewritten as:
 
315
        # with ExpectedException(AssertionError,
 
316
        #                        'InconsistentDelta not raised'):
 
317
        #     with ExpectedException(errors.InconsistentDelta, ''):
 
318
        #         self.shelve_all(tree1, rev2)
 
319
        e = self.assertRaises(AssertionError, self.assertRaises,
 
320
                              errors.InconsistentDelta, self.shelve_all, tree1,
 
321
                              rev2)
 
322
        self.assertContainsRe('InconsistentDelta not raised', str(e))
318
323
 
319
324
    def test_shelve_split(self):
320
325
        outer_tree = self.make_branch_and_tree('outer')