Add missing test coverage for fixupMaxVersion for Node256

This commit is contained in:
2024-08-07 17:02:19 -07:00
parent 7d86beb14c
commit 1d9e8ab68b
+9
View File
@@ -154,6 +154,15 @@ def test_merge_child_node48():
cs.addWrites(1, write(b"\x00" * 8, b"\x00" * 10)) cs.addWrites(1, write(b"\x00" * 8, b"\x00" * 10))
def test_fixup_256():
with DebugConflictSet() as cs:
cs.addWrites(0, write(bytes([1])))
for i in range(256):
cs.addWrites(1, write(bytes([1, i])))
cs.addWrites(2, write(bytes([0]), bytes([1])))
cs.check(read(0, bytes([1]), bytes([2])))
if __name__ == "__main__": if __name__ == "__main__":
# budget "pytest" for ctest integration without pulling in a dependency. You can of course still use pytest in local development. # budget "pytest" for ctest integration without pulling in a dependency. You can of course still use pytest in local development.
import argparse import argparse