diff --git a/test_conflict_set.py b/test_conflict_set.py index 0b4b156..1c04444 100644 --- a/test_conflict_set.py +++ b/test_conflict_set.py @@ -68,7 +68,7 @@ def test_update_zero_should_commit(): for i in range(256 - 17, 256): cs2.addWrites(int(1), write(bytes([i]))) # Scan until first point write - cs2.check(read(0, b"\x00", bytes([256 - 17]))) + assert cs2.check(read(0, b"\x00", bytes([256 - 17]))) == [Result.COMMIT] def test_update_zero_should_conflict(): @@ -81,7 +81,7 @@ def test_update_zero_should_conflict(): # "zero" is now 2**31 + 100 cs1.addWrites(2**32 + 101, write(b"", b"\x02"), write(b"\x01")) # rangeVersion of \x01 is now 2**31 + 100 ("max" of (2**31 + 100, 2**32 + 101)) - cs1.check(read(2**32 + 1, b"\x00")) + assert cs1.check(read(2**32 + 1, b"\x00")) == [Result.CONFLICT] # but 2**32 + 1 ">" 2**31 + 100 , and it incorrectly commits