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
63eb1d96
Commit
63eb1d96
authored
May 20, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fb56193f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+9
-6
No files found.
wcfs/internal/xbtree_test.py
View file @
63eb1d96
...
...
@@ -439,11 +439,9 @@ def test_restructure():
db
=
DB
(
zstor
)
zconn
=
db
.
open
()
N
=
10
# maxkey
X
=
[]
# X[i] -> XBlk corresponding to block #i
for
i
in
range
(
N
):
X
.
append
(
XBlk
(
'abcdefghij'
[
i
]))
for
i
in
range
(
12
):
X
.
append
(
XBlk
(
'abcdefghij
kl
'
[
i
]))
# assertB wraps global assertB to automatically fill in X[k] values for specified keys.
def
assertB
(
znode
,
*
keyv
):
...
...
@@ -681,6 +679,11 @@ def test_restructure():
R
(
z
,
'T2/T1-T3/B0-B1-T-T/B2-B3'
)
R
(
z
,
'T2/T1-T/T-T-B2,3/B0-B1'
)
# degenerate topology from ZODB example
z
=
Z
(
1
,
3
,
5
,
7
,
11
)
R
(
z
,
'T4/T2-T/T-T-T6,10/B1-B3-T-T-T/T-B7-B11/B5'
)
R
(
z
,
'T/B1,3,5,7,11'
)
# ---- tests on automatically generated topologies ----
#
...
...
@@ -688,11 +691,11 @@ def test_restructure():
# after restructure a tree remains valid without any error introduced )
for
nkeys
in
range
(
5
):
# XXX ↑
for
xkeyv
in
xbtree
.
_iterSplitByN
(
-
1
,
N
,
nkeys
):
for
xkeyv
in
xbtree
.
_iterSplitByN
(
-
1
,
5
+
1
,
nkeys
):
keyv
=
xkeyv
[
1
:
-
1
]
# -1, ..., N -> ...
print
(
keyv
)
z
=
Z
(
*
keyv
)
for
tree
in
xbtree
.
AllStructs
(
keyv
,
2
,
1
):
# XXX maxsplit -> 2?
for
tree
in
xbtree
.
AllStructs
(
keyv
,
3
,
2
):
#print('\t%s' % xbtree.TopoEncode(tree))
R
(
z
,
tree
)
...
...
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