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
3888b637
Commit
3888b637
authored
May 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7a0fbd7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+4
-7
No files found.
wcfs/internal/xbtree_test.py
View file @
3888b637
...
...
@@ -26,9 +26,11 @@ from BTrees.LOBTree import LOBTree, LOBucket
from
BTrees.IIBTree
import
IITreeSet
,
IISet
from
BTrees.tests
import
testBTrees
from
BTrees
import
check
as
zbcheck
from
BTrees.check
import
BTREE_EMPTY
,
BTREE_ONE
,
BTREE_NORMAL
from
persistent
import
Persistent
inf
=
float
(
'inf'
)
# build ztree with known degenerate topology, see:
# https://github.com/zopefoundation/ZODB/commit/6cd24e99f89b
# https://github.com/zopefoundation/BTrees/blob/4.7.2-1-g078ba60/BTrees/tests/testBTrees.py#L20
...
...
@@ -321,11 +323,6 @@ def test_restructure():
#B = xbtree.Bucket
#1/0
# XXX -> import?
BTREE_EMPTY
=
zbcheck
.
BTREE_EMPTY
BTREE_ONE
=
zbcheck
.
BTREE_ONE
BTREE_NORMAL
=
zbcheck
.
BTREE_NORMAL
N
=
8
# maxkey
X
=
[]
# X[i] = XBlk corresponding to block #i
...
...
@@ -457,13 +454,13 @@ def test_zwalkBFS():
# T return kind + keys of a ztree node
def
T
(
ztree
):
assert
isinstance
(
ztree
,
IITreeSet
)
kind
,
keys
,
kids
=
zbcheck
.
crack_btree
(
ztree
)
kind
,
keys
,
kids
=
zbcheck
.
crack_btree
(
ztree
,
False
)
return
(
kind
,
keys
)
# B returns keys from zbucket node
def
B
(
zbucket
):
assert
isinstance
(
zbucket
,
IISet
)
keys
,
_
=
zbcheck
.
crack_bucket
(
zbucket
)
keys
,
_
=
zbcheck
.
crack_bucket
(
zbucket
,
False
)
return
keys
R
=
xbtree
.
_Range
...
...
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