Commit 0f1e0c44 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent df73b82a
......@@ -283,7 +283,7 @@ def Restructure(ztree, newStructure):
ztreeType = type(ztree)
zbucketType = ztreeType._bucket_type
_zbcheck(ztree) # verify ztree before our tweaks
zcheck(ztree) # verify ztree before our tweaks
# dict with all k->v from ztree
kv = dict(ztree)
......@@ -521,7 +521,7 @@ def Restructure(ztree, newStructure):
assert tnew.Z is ztree
assert len(kv) == 0 # all keys must have been popped
_zbcheck(ztree) # verify ztree after our tweaks
zcheck(ztree) # verify ztree after our tweaks
tstruct = StructureOf(ztree, onlyKeys=True)
if tstruct != newStructOnlyKeys:
panic("BUG: result structure is not what was"
......@@ -955,10 +955,10 @@ def _zclassify(znode): # -> _ZNodeType
return _
# _zbcheck performs full consistency checks on ztree provided by ZODB.
# zcheck performs full consistency checks on ztree provided by ZODB.
#
# The checks are what is provided by BTree.check and node._check().
def _zbcheck(ztree):
def zcheck(ztree):
# verify internal C-level pointers consistency.
#
# Only valid to be called on root node and verifies whole tree.
......
......@@ -737,7 +737,7 @@ def test_restructure():
assert Sv(z) == newtopo
zconn.cacheMinimize() # force z state to be reloaded from storage
assert Sv(z) == newtopo # will fail if T or B is not marked as changed
xbtree._zbcheck(z)
xbtree.zcheck(z)
Rz('T/B0:a,2:c,3:d')
Rz('T1/B0:a-B2:c,3:d')
......@@ -763,7 +763,7 @@ def test_restructure():
assert Sv(z) == 'T/T1/T-T/B0:g-B1:e,2:d,3:h'
zconn.cacheMinimize()
assert Sv(z) == 'T/T1/T-T/B0:g-B1:e,2:d,3:h'
xbtree._zbcheck(z)
xbtree.zcheck(z)
z[0] = xdecode('h')
z[1] = xdecode('b')
......@@ -774,7 +774,7 @@ def test_restructure():
assert Sv(z) == 'T1/B0:h-B1:b'
zconn.cacheMinimize()
assert Sv(z) == 'T1/B0:h-B1:b' # XXX fails here
xbtree._zbcheck(z)
xbtree.zcheck(z)
z[0] = xdecode('g')
z[1] = xdecode('e')
......@@ -785,7 +785,7 @@ def test_restructure():
assert Sv(z) == 'T1/T-T3/B0:g-T-T/B1:e,2:d-B3:h'
zconn.cacheMinimize()
assert Sv(z) == 'T1/T-T3/B0:g-T-T/B1:e,2:d-B3:h'
xbtree._zbcheck(z)
xbtree.zcheck(z)
"""
......
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