Commit 80f79b9b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c3077918
...@@ -443,6 +443,11 @@ def test_restructure(): ...@@ -443,6 +443,11 @@ def test_restructure():
assert ztree[k] == v assert ztree[k] == v
# S returns topo-encoded structure of ztree
def S(ztree):
return xbtree.TopoEncode(xbtree.StructureOf(ztree))
# Z0 creates new empty tree # Z0 creates new empty tree
def Z0(): def Z0():
z = Z() z = Z()
...@@ -569,7 +574,10 @@ def test_restructure(): ...@@ -569,7 +574,10 @@ def test_restructure():
assert crack_bucket(b13) == ([1,3], [X[1], X[3]]) assert crack_bucket(b13) == ([1,3], [X[1], X[3]])
# XXX tree with one committed bucket # add 1 key -> B splits -> B + B
assert S(z) == 'T/B1,3'
z[5] = X[5]
assert S(z) == 'T3/B1-B3,5'
# XXX tree with 2 buckets # XXX tree with 2 buckets
......
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