Commit b7204162 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 565e4ce1
......@@ -41,7 +41,7 @@ Bv = lambda keyv, *valuev: xbtree.Bucket(keyv, valuev)
# buildDegenerateZTree builds ztree with known degenerate topology, see:
# 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():
ztree, keys = testBTrees.DegenerateBTree("testBasicOps")._build_degenerate_tree()
assert keys == [1, 3, 5, 7, 11]
......
......@@ -27,7 +27,7 @@ package main
// 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 -> ø
// 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
// 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) {
}
}
// Verify ΔBTail for explicitly provided tree topologies.
// TestΔBTail verifies ΔBTail for explicitly provided tree topologies.
func TestΔBTail(t *testing.T) {
// K is shorthand for SetKey
K := func(keyv ...Key) SetKey {
......@@ -780,15 +780,16 @@ func TestΔBTail(t *testing.T) {
// test known cases going through tree1 -> tree2 -> ...
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
// unlinked and 1 migrates to othe bucket, changes in that
// other bucket must be included into δT)
"T1,2/B0:e-B1:d-B2:g,3:a",
"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-B2:b", "T/B1:a,2:b",
......@@ -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) {
X := exc.Raiseif
......
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