Rev 5963: Clarify ExpectedException double clause usage. in file:///home/vila/src/bzr/reviews/merge-into-empty/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Jun 10 10:25:58 UTC 2011


At file:///home/vila/src/bzr/reviews/merge-into-empty/

------------------------------------------------------------
revno: 5963
revision-id: v.ladeuil+lp at free.fr-20110610102558-8f7qlq15lw08plrn
parent: v.ladeuil+lp at free.fr-20110610085830-7hkx6gx220tsvfpq
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: merge-into-empty
timestamp: Fri 2011-06-10 12:25:58 +0200
message:
  Clarify ExpectedException double clause usage.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_shelf_ui.py'
--- a/bzrlib/tests/test_shelf_ui.py	2011-06-09 18:56:55 +0000
+++ b/bzrlib/tests/test_shelf_ui.py	2011-06-10 10:25:58 +0000
@@ -313,8 +313,10 @@
                                 from_revision=revision.NULL_REVISION)
         tree1.commit('Replaced root entry')
         self.shelve_all(tree1, rev2)
-        # This is essentially assertNotRaises(InconsistentDelta)
-        with ExpectedException(AssertionError, ''):
+        with ExpectedException(AssertionError, 'InconsistentDelta not raised'):
+            # We expect errors.InconsistentDelta to not be raised.
+            # ExpectedException will raise an AssertionError that we'll catch
+            # in the enclosing 'with'
             with ExpectedException(errors.InconsistentDelta, ''):
                 self.shelve_all(tree1, rev2)
 



More information about the bazaar-commits mailing list