Commit 5b329895 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7f910182
......@@ -529,16 +529,19 @@ def test_restructure():
kind, keys, kids = crack_btree(z)
assert (kind, keys) == (BTREE_NORMAL, [2])
assert len(kids) == 2
assert isinstance(kids[0], LOBucket)
assert isinstance(kids[1], LOBucket)
assert crack_bucket(kids[0]) == ([1], [X[1]])
assert crack_bucket(kids[1]) == ([3], [X[3]])
b1, b3 = kids
assert isinstance(b1, LOBucket)
assert isinstance(b3, LOBucket)
assert crack_bucket(b1) == ([1], [X[1]])
assert crack_bucket(b3) == ([3], [X[3]])
R(z, 'T/B1,3')
kind, keys, kids = crack_btree(z)
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 1
assert isinstance(kids[0], LOBucket)
assert crack_btree(kids[0]) == ([1,3], [X[1], X[3]])
b13 = kids[0]
assert b13 is b1
assert isinstance(b13, LOBucket)
assert crack_btree(b13) == ([1,3], [X[1], X[3]])
# XXX tree with one committed bucket
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment