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
3e55a643
Commit
3e55a643
authored
May 13, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8376e5b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+5
-0
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+3
-0
No files found.
wcfs/internal/xbtree.py
View file @
3e55a643
...
@@ -441,6 +441,11 @@ def Restructure(ztree, newStructure):
...
@@ -441,6 +441,11 @@ def Restructure(ztree, newStructure):
print
(
'ZSTATE:'
,
zstate
)
print
(
'ZSTATE:'
,
zstate
)
node
.
Z
.
__setstate__
(
zstate
)
node
.
Z
.
__setstate__
(
zstate
)
zstate2
=
node
.
Z
.
__getstate__
()
if
zstate2
!=
zstate
:
panic
(
"BUG: Restructure: node.__getstate__ returns not what "
"we passed into node.__setstate__.
\
n
node: %r
\
n
"
"__setstate__ <- %r
\
n
__getstate__ -> %r"
%
(
node
.
Z
,
zstate
,
zstate2
))
assert
tnew
.
Z
is
ztree
assert
tnew
.
Z
is
ztree
...
...
wcfs/internal/xbtree_test.py
View file @
3e55a643
...
@@ -370,6 +370,9 @@ def test_restructure():
...
@@ -370,6 +370,9 @@ def test_restructure():
assert
(
kind
,
keys
)
==
(
BTREE_NORMAL
,
[])
assert
(
kind
,
keys
)
==
(
BTREE_NORMAL
,
[])
assert
len
(
kids
)
==
1
assert
len
(
kids
)
==
1
assert
isinstance
(
kids
[
0
],
XLOTree
)
assert
isinstance
(
kids
[
0
],
XLOTree
)
print
(
'
\
n
AAA'
)
print
(
kids
[
0
])
print
(
kids
[
0
].
__getstate__
())
kind
,
keys
,
kids
=
crack_btree
(
kids
[
0
])
kind
,
keys
,
kids
=
crack_btree
(
kids
[
0
])
assert
(
kind
,
keys
)
==
(
BTREE_NORMAL
,
[])
assert
(
kind
,
keys
)
==
(
BTREE_NORMAL
,
[])
assert
len
(
kids
)
==
0
assert
len
(
kids
)
==
0
...
...
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