Rev 2396: Some small changes to move tests. in http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate

John Arbash Meinel john at arbash-meinel.com
Sun Feb 25 20:37:40 GMT 2007


At http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate

------------------------------------------------------------
revno: 2396
revision-id: john at arbash-meinel.com-20070225203634-gkj6ic15hpadb5np
parent: john at arbash-meinel.com-20070225191617-wcc828lmf5sdad47
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate
timestamp: Sun 2007-02-25 14:36:34 -0600
message:
  Some small changes to move tests.
modified:
  bzrlib/tests/workingtree_implementations/test_move.py test_move.py-20070225171927-mohn2vqj5fx7edc6-1
-------------- next part --------------
=== modified file 'bzrlib/tests/workingtree_implementations/test_move.py'
--- a/bzrlib/tests/workingtree_implementations/test_move.py	2007-02-25 19:16:17 +0000
+++ b/bzrlib/tests/workingtree_implementations/test_move.py	2007-02-25 20:36:34 +0000
@@ -249,6 +249,8 @@
         tree.move(['a'], 'b')
         self.assertTreeLayout([('', root_id), ('b', 'b-id'), ('b/a', 'a-id')],
                               tree)
+        self.assertTreeLayout([('', root_id), ('a', 'a-id'), ('b', 'b-id')],
+                              tree.basis_tree())
 
     def test_move_after_with_after(self):
         tree = self.make_branch_and_tree('.')
@@ -264,6 +266,8 @@
         tree.move(['a'], 'b', after=True)
         self.assertTreeLayout([('', root_id), ('b', 'b-id'), ('b/a', 'a-id')],
                               tree)
+        self.assertTreeLayout([('', root_id), ('a', 'a-id'), ('b', 'b-id')],
+                              tree.basis_tree())
 
     def test_move_after_no_target(self):
         tree = self.make_branch_and_tree('.')
@@ -275,6 +279,8 @@
         # Passing after when the file hasn't been move raises an exception
         self.assertRaises(errors.BzrMoveFailedError,
                           tree.move, ['a'], 'b', after=True)
+        self.assertTreeLayout([('', root_id), ('a', 'a-id'), ('b', 'b-id')],
+                              tree.basis_tree())
 
     def test_move_after_source_and_dest(self):
         tree = self.make_branch_and_tree('.')
@@ -308,6 +314,8 @@
         tree.move(['a'], 'b', after=True)
         self.assertTreeLayout([('', root_id), ('b', 'b-id'), ('b/a', 'a-id')],
                               tree)
+        self.assertTreeLayout([('', root_id), ('a', 'a-id'), ('b', 'b-id')],
+                              tree.basis_tree())
         # But it shouldn't actually move anything
         self.assertFileEqual(a_text, 'a')
         self.assertFileEqual(ba_text, 'b/a')



More information about the bazaar-commits mailing list