Rev 3771: simple test of overlapped behavior in http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/btree_buffer

John Arbash Meinel john at arbash-meinel.com
Tue Oct 14 20:04:53 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/btree_buffer

------------------------------------------------------------
revno: 3771
revision-id: john at arbash-meinel.com-20081014190433-81nbtayr41p7vr33
parent: john at arbash-meinel.com-20081014190226-xns3yk2nti9p96zd
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: btree_buffer
timestamp: Tue 2008-10-14 14:04:33 -0500
message:
  simple test of overlapped behavior
-------------- next part --------------
=== modified file 'bzrlib/tests/test_btree_index.py'
--- a/bzrlib/tests/test_btree_index.py	2008-10-14 19:02:26 +0000
+++ b/bzrlib/tests/test_btree_index.py	2008-10-14 19:04:33 +0000
@@ -1103,7 +1103,7 @@
         self.assertExpandNodes([1, 2, 3, 9, 10, 11, 80, 81, 82], index,
                                [2, 10, 81])
 
-    def test_expand_to_cached(self):
+    def test_stop_at_cached(self):
         index = self.make_100_node_index()
         self.set_cached_nodes(index, [0, 10, 19])
         self.assertExpandNodes([11, 12, 13, 14, 15, 16], index, [11])
@@ -1113,8 +1113,13 @@
         self.assertExpandNodes([13, 14, 15, 16, 17, 18], index, [17])
         self.assertExpandNodes([13, 14, 15, 16, 17, 18], index, [18])
 
-    def test_expand_limited(self):
+    def test_cannot_fully_expand(self):
         index = self.make_100_node_index()
         self.set_cached_nodes(index, [0, 10, 12])
         # We don't go into an endless loop if we are bound by cached nodes
         self.assertExpandNodes([11], index, [11])
+
+    def test_overlap(self):
+        index = self.make_100_node_index()
+        self.assertExpandNodes([10, 11, 12, 13, 14, 15], index, [12, 13])
+        self.assertExpandNodes([10, 11, 12, 13, 14, 15], index, [11, 14])



More information about the bazaar-commits mailing list