Commit f24be16b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f4573bd4
......@@ -52,7 +52,6 @@ def test_structureOf():
T([], B(7)),
T([], B(11))) ))
def test_topoEncoding():
T = xbtree.Tree
B = xbtree.Bucket
......@@ -67,15 +66,12 @@ def test_topoEncoding():
assert X(T([], B(1,3))) == 'T/B1,3'
assert X(T([], T([], B()))) == 'T/T/B'
# XXX two B under same T
# XXX more
assert X(T([3],
T([], B(1)),
T([],
T([5], B(), B(7,8,9))))) == "T3/T-T/B1-T5/B-B7,8,9"
# degenerate btree from ^^^
# degenerate btree from ZODB
assert X(T([4],
T([2],
T([], B(1)), T([], B(3))),
......@@ -86,6 +82,11 @@ def test_topoEncoding():
T([], B(11))) ))) == "T4/T2-T/T-T-T6,10/B1-B3-T-T-T/T-B7-B11/B5"
for tree in xbtree.AllStructs([1,3,7,8], 1,2):
t2 = xbtree.TopoDecode(xbtree.TopoEncode(tree))
assert t2 == tree
def test_allStructs():
T = xbtree.Tree
B = xbtree.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