Commit e75a1836 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a044d98b
...@@ -327,6 +327,13 @@ def test_restructure(): ...@@ -327,6 +327,13 @@ def test_restructure():
#B = xbtree.Bucket #B = xbtree.Bucket
#1/0 #1/0
# do restructure tests under ZODB because without ZODB connection it is not
# always possible to __setstate__ for e.g. .../T/B.
zstor = MappingStorage()
db = DB(zstor)
zconn = db.open()
#zroot = zconn.root()
N = 8 # maxkey N = 8 # maxkey
X = [] # X[i] = XBlk corresponding to block #i X = [] # X[i] = XBlk corresponding to block #i
...@@ -336,6 +343,7 @@ def test_restructure(): ...@@ -336,6 +343,7 @@ def test_restructure():
# prepare ztree with given keys via usual way # prepare ztree with given keys via usual way
def Z(*keys): def Z(*keys):
ztree = XLOTree() # XXX -> class with node size=2 ztree = XLOTree() # XXX -> class with node size=2
zconn.add(ztree)
for k in keys: for k in keys:
ztree[k] = X[k] ztree[k] = X[k]
return ztree return ztree
...@@ -455,7 +463,7 @@ def test_zwalkBFS(): ...@@ -455,7 +463,7 @@ def test_zwalkBFS():
# assign oid to created objects to force btrees not to embed bucket state # assign oid to created objects to force btrees not to embed bucket state
zstor = MappingStorage() zstor = MappingStorage()
db= DB(zstor) db = DB(zstor)
zconn = db.open() zconn = db.open()
zroot = zconn.root() zroot = zconn.root()
zroot['x'] = zt zroot['x'] = zt
......
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