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,
322
self.assertContainsRe('InconsistentDelta not raised', str(e))
319
324
def test_shelve_split(self):
320
325
outer_tree = self.make_branch_and_tree('outer')