Commit fcd7d1b1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2e1fb4d8
......@@ -473,7 +473,11 @@ def test_restructure():
for (k,v) in items:
assert ztree[k] == v
if isinstance(newtopo, str):
newStructure = xbtree.TopoDecode(newtopo)
else:
assert isinstance(newtopo, xbtree.Tree)
newStructure = newtopo
xbtree.Restructure(ztree, newStructure)
assert xbtree.StructureOf(ztree) == newStructure
......@@ -676,8 +680,14 @@ def test_restructure():
# ( we make sure that Restructure can make the restructurement and that
# after restructure a tree remains valid without any error introduced )
for nkeys in range(5): # XXX
pass
for nkeys in range(5): # XXX ↑
for xkeyv in xbtree._iterSplitByN(-1, N, nkeys):
keyv = xkeyv[1:-1] # -1, ..., N -> ...
#print(keyv)
z = Z(*keyv)
for tree in xbtree.AllStructs(keyv, 1, 1): # XXX maxdepth -> 2, maxsplit -> 2?
#print('\t%s' % xbtree.TopoEncode(tree))
R(z, tree)
def test_walkBFS():
......
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