Commit bf388552 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4942c244
......@@ -198,7 +198,7 @@ def Restructure(ztree, newStructure):
tstruct = StructureOf(ztree)
if tstruct != newStructure:
panic("BUG: Restructure: result structure is not what was"
"requested:\n%s\n\nwant:\n%s" % (tstruct, newStructure))
" requested:\n%s\n\nwant:\n%s" % (tstruct, newStructure))
print()
print(newStructure)
print()
......
......@@ -367,6 +367,13 @@ def test_restructure():
# ø -> T/T-T/B-B
z = Z0()
R(z, 'T0/T-T/B-B')
kind, keys, kids = crack_btree(z)
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, [], [])
# 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