Commit 7799b429 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f33e0917
......@@ -162,9 +162,13 @@ def _iterAllStructs(klo, khi, keyv, maxdepth, maxsplit):
assert klo <= khi
# XXX assert keyv sorted, in [klo, khi)
for nsplit in range(0, maxsplit):
print('_iterAllStructs [%s, %s) keyv: %r, maxdepth=%d, maxsplit=%d' %
(klo, khi, keyv, maxdepth, maxsplit))
for nsplit in range(0, maxsplit+1):
for ksplitv in _iterSplitByN(klo, khi, nsplit):
# ksplitv = [klo, s1, s2, ..., sN, khi]
print('ksplitv: %r' % ksplitv)
# emit Tree -> Buckets
children = []
......
......@@ -18,6 +18,9 @@
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
from __future__ import print_function, absolute_import
from wendelin.wcfs.internal import xbtree
from BTrees.LOBTree import LOBTree
from BTrees.tests import testBTrees
......@@ -73,7 +76,13 @@ def test_iterAllStructs():
def X(keys, maxdepth, maxsplit):
return list(xbtree.IterAllStructs(keys, maxdepth, maxsplit))
print()
assert X([], 0, 0) == [ T([], B()) ]
return
assert X([1], 0, 0) == [ T([], B(1)) ]
assert X([1,3], 0, 0) == [ T([], B(1,3)) ]
......
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