Commit ff58a7c0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bbbc4713
......@@ -44,7 +44,8 @@ def test_structureOf():
t, keys = testBTrees.DegenerateBTree("testBasicOps")._build_degenerate_tree()
assert keys == [1, 3, 5, 7, 11]
assert xbtree.StructureOf(t) == T([4],
_ = xbtree.StructureOf(t)
assert _ == T([4],
T([2],
T([], B(1)), T([], B(3))),
T([],
......@@ -53,25 +54,7 @@ def test_structureOf():
T([], B(7)),
T([], B(11))) ))
#assert xbtree.TopoEncode(t) == 'T4/T2-T/T-T-T6,10/B1-B3-T-T-T/T-B7-B11/B5'
"""
#assert btree.TopoEncodingOf(t) == ((4,), (2,), ø(4), (6,10), ø(5?), ø(7), ø(11), x(5?))
assert btree.TopoEncode(t) == \
(4,), (2,),(), (),(),(6,10), B(1),B(3),(),(),(), (),B(7),B(11), B(5)
# T4 T2-T T-T-T6,10 B1-B3-T-T-T T-B7-B11 B5 <-- good
# T4·T2-T·T-T-T6,10·B1-B3-T-T-T·T-B7-B11·B5. <- ?
# T4/T2-T/T-T-T6,10/B1-B3-T-T-T/T-B7-B11/B5 <- ? y
"""
"""
assert xbtree.TopologyOf(t) == ( (4,),
((2,), ()),
(((), ()), (6, 10)),
"""
assert xbtree.TopoEncode(_) == 'T4/T2-T/T-T-T6,10/B1-B3-T-T-T/T-B7-B11/B5'
def test_topoEncoding():
......
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