Commit 3e55a643 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8376e5b7
......@@ -441,6 +441,11 @@ def Restructure(ztree, newStructure):
print('ZSTATE:', zstate)
node.Z.__setstate__(zstate)
zstate2 = node.Z.__getstate__()
if zstate2 != zstate:
panic("BUG: Restructure: node.__getstate__ returns not what "
"we passed into node.__setstate__.\nnode: %r\n"
"__setstate__ <- %r\n__getstate__ -> %r" % (node.Z, zstate, zstate2))
assert tnew.Z is ztree
......
......@@ -370,6 +370,9 @@ def test_restructure():
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 1
assert isinstance(kids[0], XLOTree)
print('\nAAA')
print(kids[0])
print(kids[0].__getstate__())
kind, keys, kids = crack_btree(kids[0])
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 0
......
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