Exercise freelist size limiting code

This commit is contained in:
2024-04-17 18:27:01 -07:00
parent c15d296432
commit 76a45f16ad
+11
View File
@@ -81,6 +81,17 @@ def test_decrease_capacity():
cs.setOldestVersion(1) cs.setOldestVersion(1)
def test_large():
with DebugConflictSet() as cs:
end = 100000
for i in range(end):
cs.addWrites(1, write(i.to_bytes(8, byteorder="big")))
cs.addWrites(
2,
write((0).to_bytes(8, byteorder="big"), (end).to_bytes(8, byteorder="big")),
)
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