Commit 13d92f95 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0fed1216
......@@ -387,12 +387,23 @@ def test_restructure():
z = Z0()
R(z, 'T0/T-T/B-B')
kind, keys, kids = crack_btree(z)
assert (kind, keys) == (BTREE_NORMAL, 0)
assert (kind, keys) == (BTREE_NORMAL, [0])
assert len(kids) == 2
assert isinstance(kids[0], XLOTree)
assert isinstance(kids[1], XLOTree)
assert crack_btree(kids[0]) == (BTREE_EMPTY, [], [])
assert crack_btree(kids[1]) == (BTREE_EMPTY, [], [])
Tl, Tr = kids
assert isinstance(Tl, XLOTree)
assert isinstance(Tr, XLOTree)
kind, keys, kids = crack_btree(Tl)
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 1
assert isinstance(kids[0], LOBucket)
assert crack_bucket(kids[0]) == ([], [])
kind, keys, kids = crack_btree(Tr)
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 1
assert isinstance(kids[0], LOBucket)
assert crack_bucket(kids[0]) == ([], [])
# tree with one not-yet 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