Rev 5004: Make the test more precise. in file:///home/vila/src/bzr/reviews/update/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Feb 10 13:35:45 GMT 2010


At file:///home/vila/src/bzr/reviews/update/

------------------------------------------------------------
revno: 5004
revision-id: v.ladeuil+lp at free.fr-20100210133544-f16kwf7fjbikton5
parent: v.ladeuil+lp at free.fr-20100210132435-u8bibvztzwhyi6vh
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: update
timestamp: Wed 2010-02-10 14:35:44 +0100
message:
  Make the test more precise.
  
  * bzrlib/tests/per_workingtree/test_workingtree.py:
  (TestWorkingTreeUpdate.test_update_remove_commit): More
  assertions.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_workingtree/test_workingtree.py'
--- a/bzrlib/tests/per_workingtree/test_workingtree.py	2010-02-10 13:24:35 +0000
+++ b/bzrlib/tests/per_workingtree/test_workingtree.py	2010-02-10 13:35:44 +0000
@@ -1029,8 +1029,15 @@
         builder, tip = self.make_diverged_master_branch()
         wt, b, master = self.make_wt_branch_and_master(
             builder, ('W', '4'), ('B', '2'), ('M', tip))
+        # First update the branch
+        old_tip = wt.branch.update()
+        self.assertEqual('4', old_tip)
         # No conflicts should occur
-        self.assertEqual(0, wt.update(old_tip='2'))
+        self.assertEqual(0, wt.update(old_tip='2')) # Force an out-of-date tip
+        # We are in sync with the master
+        self.assertEqual(tip, wt.branch.last_revision())
+        # We have the right parents ready to be merged
+        self.assertEqual(['5', '2'], wt.get_parent_ids())
 
 
 class TestIllegalPaths(TestCaseWithWorkingTree):



More information about the bazaar-commits mailing list