10 lines
268 B
Python
10 lines
268 B
Python
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]
|