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
7a0fbd7d
Commit
7a0fbd7d
authored
May 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b3b31585
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+10
-7
No files found.
wcfs/internal/xbtree_test.py
View file @
7a0fbd7d
...
...
@@ -23,8 +23,9 @@ from __future__ import print_function, absolute_import
from
wendelin.wcfs.internal
import
xbtree
from
BTrees.LOBTree
import
LOBTree
,
LOBucket
from
BTrees.IIBTree
import
IITreeSet
,
IISet
from
BTrees.tests
import
testBTrees
from
BTrees
import
check
as
bcheck
from
BTrees
import
check
as
z
bcheck
from
persistent
import
Persistent
inf
=
float
(
'inf'
)
...
...
@@ -306,13 +307,13 @@ class XLOTree(LOBTree):
max_leaf_size
=
2
max_internal_size
=
2
bcheck
.
_type2kind
[
XLOTree
]
=
(
bcheck
.
TYPE_BTREE
,
True
)
zbcheck
.
_type2kind
[
XLOTree
]
=
(
z
bcheck
.
TYPE_BTREE
,
True
)
def
crack_btree
(
ztree
):
return
bcheck
.
crack_btree
(
ztree
,
is_mapping
=
True
)
return
z
bcheck
.
crack_btree
(
ztree
,
is_mapping
=
True
)
def
crack_bucket
(
zbucket
):
return
bcheck
.
crack_bucket
(
zbucket
,
is_mapping
=
True
)
return
z
bcheck
.
crack_bucket
(
zbucket
,
is_mapping
=
True
)
def
test_restructure
():
...
...
@@ -321,9 +322,9 @@ def test_restructure():
#1/0
# XXX -> import?
BTREE_EMPTY
=
bcheck
.
BTREE_EMPTY
BTREE_ONE
=
bcheck
.
BTREE_ONE
BTREE_NORMAL
=
bcheck
.
BTREE_NORMAL
BTREE_EMPTY
=
z
bcheck
.
BTREE_EMPTY
BTREE_ONE
=
z
bcheck
.
BTREE_ONE
BTREE_NORMAL
=
z
bcheck
.
BTREE_NORMAL
N
=
8
# maxkey
...
...
@@ -465,6 +466,8 @@ def test_zwalkBFS():
keys
,
_
=
zbcheck
.
crack_bucket
(
zbucket
)
return
keys
R
=
xbtree
.
_Range
zwalkv
=
list
(
xbtree
.
__zwalkBFS
(
zt
))
assert
len
(
zwalkv
)
==
6
# [-∞,∞)T4,
# [-∞,4)T2, [4,∞)T
...
...
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