Commit 18b46d86 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 572e2e21
...@@ -349,9 +349,12 @@ def Restructure(ztree, newStructure): ...@@ -349,9 +349,12 @@ def Restructure(ztree, newStructure):
if len(zrlevelv) > 0: if len(zrlevelv) > 0:
zrlevel = zrlevelv.pop(0) zrlevel = zrlevelv.pop(0)
print('ZRLEVEL:', zrlevel)
# filter-out buckets to be processed in the end # filter-out buckets to be processed in the end
zrbucketv, zrlevel = _filter2(zrlevel, lambda zrn: isinstance(zrn.node, zbucketType)) _, zrlevel = _filter2(zrlevel, lambda zrn: isinstance(zrn.node, zbucketType))
rbucketv, rlevel = _filter2(rlevel, lambda rn: isinstance(rn.node, Bucket)) zrbucketv.extend(_)
_, rlevel = _filter2(rlevel, lambda rn: isinstance(rn.node, Bucket))
rbucketv.extend(_)
if len(rlevel) == 0: if len(rlevel) == 0:
continue continue
...@@ -369,6 +372,7 @@ def Restructure(ztree, newStructure): ...@@ -369,6 +372,7 @@ def Restructure(ztree, newStructure):
# verify that old keys == new keys # verify that old keys == new keys
zkeys = set() zkeys = set()
keys = set() keys = set()
print('ZRBUCKETV:', zrbucketv)
for _ in zrbucketv: zkeys.update(_.node.keys()) for _ in zrbucketv: zkeys.update(_.node.keys())
for _ in rbucketv: keys.update(_.node.keyv) for _ in rbucketv: keys.update(_.node.keyv)
assert set(kv.keys()) == zkeys, (set(kv.keys()), zkeys) assert set(kv.keys()) == zkeys, (set(kv.keys()), zkeys)
......
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