Commit 7a0fbd7d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b3b31585
......@@ -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 zbcheck
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] = (zbcheck.TYPE_BTREE, True)
def crack_btree(ztree):
return bcheck.crack_btree(ztree, is_mapping=True)
return zbcheck.crack_btree(ztree, is_mapping=True)
def crack_bucket(zbucket):
return bcheck.crack_bucket(zbucket, is_mapping=True)
return zbcheck.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 = zbcheck.BTREE_EMPTY
BTREE_ONE = zbcheck.BTREE_ONE
BTREE_NORMAL= zbcheck.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
......
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