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
b7204162
Commit
b7204162
authored
Aug 03, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
565e4ce1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+1
-1
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+7
-6
No files found.
wcfs/internal/xbtree_test.py
View file @
b7204162
...
@@ -41,7 +41,7 @@ Bv = lambda keyv, *valuev: xbtree.Bucket(keyv, valuev)
...
@@ -41,7 +41,7 @@ Bv = lambda keyv, *valuev: xbtree.Bucket(keyv, valuev)
# buildDegenerateZTree builds ztree with known degenerate topology, see:
# buildDegenerateZTree builds ztree with known degenerate topology, see:
# https://github.com/zopefoundation/ZODB/commit/6cd24e99f89b
# https://github.com/zopefoundation/ZODB/commit/6cd24e99f89b
# https://github.com/zopefoundation/BTrees/blob/4.7.2-1-g078ba60/BTrees/tests/testBTrees.py#L20
# https://github.com/zopefoundation/BTrees/blob/4.7.2-1-g078ba60/BTrees/tests/testBTrees.py#L20
-L57
def
buildDegenerateZTree
():
def
buildDegenerateZTree
():
ztree
,
keys
=
testBTrees
.
DegenerateBTree
(
"testBasicOps"
).
_build_degenerate_tree
()
ztree
,
keys
=
testBTrees
.
DegenerateBTree
(
"testBasicOps"
).
_build_degenerate_tree
()
assert
keys
==
[
1
,
3
,
5
,
7
,
11
]
assert
keys
==
[
1
,
3
,
5
,
7
,
11
]
...
...
wcfs/δbtail_test.go
View file @
b7204162
...
@@ -27,7 +27,7 @@ package main
...
@@ -27,7 +27,7 @@ package main
// Av, Bv - topologies with values ex T/B1:a T2/B1:b-B3:c
// Av, Bv - topologies with values ex T/B1:a T2/B1:b-B3:c
//
//
// δ(Av, Bv) - full diff {k -> v} for changed keys; DEL = k -> ø
// δ(Av, Bv) - full diff {k -> v} for changed keys; DEL = k -> ø
// ex δ(T/B1:a, T2/B1:b-B3:c) = {1:
a 3:c}
// ex δ(T/B1:a, T2/B1:b-B3:c) = {1:
b 3:c} XXX include "was" value too?
//
//
// Δ(T, Av, Bv) - subset of δ(Av, Bv) corresponding to initial tracking set T
// Δ(T, Av, Bv) - subset of δ(Av, Bv) corresponding to initial tracking set T
// ex Δ({1}, T/B1:a, T2/B1:b-B3:c) = {1:b} (no 3:c)
// ex Δ({1}, T/B1:a, T2/B1:b-B3:c) = {1:b} (no 3:c)
...
@@ -759,7 +759,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) {
...
@@ -759,7 +759,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) {
}
}
}
}
//
Verify
ΔBTail for explicitly provided tree topologies.
//
TestΔBTail verifies
ΔBTail for explicitly provided tree topologies.
func
TestΔBTail
(
t
*
testing
.
T
)
{
func
TestΔBTail
(
t
*
testing
.
T
)
{
// K is shorthand for SetKey
// K is shorthand for SetKey
K
:=
func
(
keyv
...
Key
)
SetKey
{
K
:=
func
(
keyv
...
Key
)
SetKey
{
...
@@ -780,15 +780,16 @@ func TestΔBTail(t *testing.T) {
...
@@ -780,15 +780,16 @@ func TestΔBTail(t *testing.T) {
// test known cases going through tree1 -> tree2 -> ...
// test known cases going through tree1 -> tree2 -> ...
testv
:=
[]
interface
{}
{
testv
:=
[]
interface
{}
{
// XXX the same issue as vvv but with depth=2
"T1,2/T-T-T/B0:a-B1:b-B2:c,3:d"
,
"T1/T-T/B0:e-B1:b,2:f"
,
// found by AllStructs ([1] is not changed, but because B1 is
// found by AllStructs ([1] is not changed, but because B1 is
// unlinked and 1 migrates to othe bucket, changes in that
// unlinked and 1 migrates to othe bucket, changes in that
// other bucket must be included into δT)
// other bucket must be included into δT)
"T1,2/B0:e-B1:d-B2:g,3:a"
,
"T1,2/B0:e-B1:d-B2:g,3:a"
,
"T1/B0:d-B1:d,2:d"
,
"T1/B0:d-B1:d,2:d"
,
// XXX the same issue as ^^^ but with depth=2
"T1,2/T-T-T/B0:a-B1:b-B2:c,3:d"
,
"T1/T-T/B0:e-B1:b,2:f"
,
"T2/B1:a-B7:g"
,
"T2,8/B1:a-B7:g-B9:i"
,
"T2/B1:a-B7:g"
,
"T2,8/B1:a-B7:g-B9:i"
,
"T2/B1:a-B2:b"
,
"T/B1:a,2:b"
,
"T2/B1:a-B2:b"
,
"T/B1:a,2:b"
,
...
@@ -947,7 +948,7 @@ func TestΔBTail(t *testing.T) {
...
@@ -947,7 +948,7 @@ func TestΔBTail(t *testing.T) {
}
}
//
Verify
ΔBtail on tree topologies generated by AllStructs.
//
TestΔBTreeAllStructs verifies
ΔBtail on tree topologies generated by AllStructs.
func
TestΔBTreeAllStructs
(
t
*
testing
.
T
)
{
func
TestΔBTreeAllStructs
(
t
*
testing
.
T
)
{
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
...
...
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