Preliminary support for writing tests in python

This commit is contained in:
2024-04-04 15:57:16 -07:00
parent 4f97932893
commit 5cf45d1c35
2 changed files with 127 additions and 0 deletions

9
test_conflict_set.py Normal file
View File

@@ -0,0 +1,9 @@
from conflict_set import *
def test_conflict_set():
with ConflictSet() as cs:
cs.addWrites(1, write(b""))
assert cs.check(read(0, b"")) == [Result.CONFLICT]
cs.setOldestVersion(1)
assert cs.check(read(0, b"")) == [Result.TOO_OLD]