forked from weaselab/conflict-set
Exercise copyChildrenAndKeyFrom for Node{48,256} to itself
This commit is contained in:
@@ -66,6 +66,21 @@ def test_inner_full_words():
|
||||
cs.check(read(1, b"\x21", b"\xc2"))
|
||||
|
||||
|
||||
def test_decrease_capacity():
|
||||
# make a Node48, then a Node256
|
||||
for count in (17, 49):
|
||||
with DebugConflictSet() as cs:
|
||||
for i in range(count):
|
||||
cs.addWrites(1, write(bytes(([0] * 99) + [i])))
|
||||
# lower its partial key length
|
||||
cs.addWrites(2, write(bytes([0] * 98)))
|
||||
# create work for setOldestVersion
|
||||
for i in range(3, 1000):
|
||||
cs.addWrites(i)
|
||||
# setOldestVersion should decrease the capacity
|
||||
cs.setOldestVersion(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# budget "pytest" for ctest integration without pulling in a dependency. You can of course still use pytest in local development.
|
||||
import argparse
|
||||
|
||||
Reference in New Issue
Block a user