Commit 3888b637 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7a0fbd7d
......@@ -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
......
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