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
0f1e0c44
Commit
0f1e0c44
authored
Jun 03, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
df73b82a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+4
-4
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+4
-4
No files found.
wcfs/internal/xbtree.py
View file @
0f1e0c44
...
...
@@ -283,7 +283,7 @@ def Restructure(ztree, newStructure):
ztreeType
=
type
(
ztree
)
zbucketType
=
ztreeType
.
_bucket_type
_zb
check
(
ztree
)
# verify ztree before our tweaks
z
check
(
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
_zb
check
(
ztree
)
# verify ztree after our tweaks
z
check
(
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
_
#
_zb
check performs full consistency checks on ztree provided by ZODB.
#
z
check performs full consistency checks on ztree provided by ZODB.
#
# The checks are what is provided by BTree.check and node._check().
def
_zb
check
(
ztree
):
def
z
check
(
ztree
):
# verify internal C-level pointers consistency.
#
# Only valid to be called on root node and verifies whole tree.
...
...
wcfs/internal/xbtree_test.py
View file @
0f1e0c44
...
...
@@ -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.
_zb
check(z)
xbtree.
z
check(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.
_zb
check(z)
xbtree.
z
check(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.
_zb
check(z)
xbtree.
z
check(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.
_zb
check(z)
xbtree.
z
check(z)
"""
...
...
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