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

.

parent 6362d840
......@@ -511,15 +511,21 @@ def test_restructure():
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 1
assert isinstance(kids[0], LOBucket)
keys, values = crack_bucket(kids[0])
assert keys == [1]
assert values == [X[1]]
assert crack_bucket(kids[0]) == ([1], [X[1]])
# tree with one not-yet committed bucket
# tree with 2 k->v (not-yet committed bucket)
z = Z(1,3)
assert crack_btree(z) == (BTREE_ONE, ((1, X[1], 3, X[3]),), None)
R(z, 'T2/B1-B3')
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]])
# 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