From 1d9e8ab68be7d3a9461b3336f80abbfb6465395e Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 7 Aug 2024 16:52:10 -0700 Subject: [PATCH] Add missing test coverage for fixupMaxVersion for Node256 --- test_conflict_set.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test_conflict_set.py b/test_conflict_set.py index 383f17f..6f90aea 100644 --- a/test_conflict_set.py +++ b/test_conflict_set.py @@ -154,6 +154,15 @@ def test_merge_child_node48(): 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__": # budget "pytest" for ctest integration without pulling in a dependency. You can of course still use pytest in local development. import argparse