~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf_ui.py

  • Committer: Martin Pool
  • Date: 2011-06-19 02:24:39 UTC
  • mfrom: (5985 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110619022439-u68683yb2bw302x0
resolve conflicts against trunk

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')