From 76a45f16ad35b617224faa2738aa13d3e351b0ee Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 17 Apr 2024 18:27:01 -0700 Subject: [PATCH] Exercise freelist size limiting code --- test_conflict_set.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test_conflict_set.py b/test_conflict_set.py index 417dc40..7c6aaea 100644 --- a/test_conflict_set.py +++ b/test_conflict_set.py @@ -81,6 +81,17 @@ def test_decrease_capacity(): 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__": # budget "pytest" for ctest integration without pulling in a dependency. You can of course still use pytest in local development. import argparse