Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
7799b429
Commit
7799b429
authored
May 04, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f33e0917
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+5
-1
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+9
-0
No files found.
wcfs/internal/xbtree.py
View file @
7799b429
...
...
@@ -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
=
[]
...
...
wcfs/internal/xbtree_test.py
View file @
7799b429
...
...
@@ -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
))
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment