python tester now sometimes uses has_incomplete_versionstamp
This commit is contained in:
parent
9fd934e002
commit
5e44aa06e4
|
@ -457,15 +457,18 @@ class Tester:
|
|||
prefix = inst.pop()
|
||||
count = inst.pop()
|
||||
items = inst.pop(count)
|
||||
try:
|
||||
packed = fdb.tuple.pack_with_versionstamp(tuple(items), prefix=prefix)
|
||||
inst.push(b"OK")
|
||||
inst.push(packed)
|
||||
except ValueError as e:
|
||||
if str(e).startswith("No incomplete"):
|
||||
inst.push(b"ERROR: NONE")
|
||||
else:
|
||||
inst.push(b"ERROR: MULTIPLE")
|
||||
if not fdb.tuple.has_incomplete_versionstamp(items) and random.random() < 0.5:
|
||||
inst.push(b"ERROR: NONE")
|
||||
else:
|
||||
try:
|
||||
packed = fdb.tuple.pack_with_versionstamp(tuple(items), prefix=prefix)
|
||||
inst.push(b"OK")
|
||||
inst.push(packed)
|
||||
except ValueError as e:
|
||||
if str(e).startswith("No incomplete"):
|
||||
inst.push(b"ERROR: NONE")
|
||||
else:
|
||||
inst.push(b"ERROR: MULTIPLE")
|
||||
elif inst.op == six.u("TUPLE_UNPACK"):
|
||||
for i in fdb.tuple.unpack( inst.pop() ):
|
||||
inst.push(fdb.tuple.pack((i,)))
|
||||
|
|
Loading…
Reference in New Issue