def checkTypicalUsage(self): tbuf = TransactionBuffer(0) store(tbuf) store(tbuf) for o in tbuf: pass tbuf.close()
def checkOrderPreserved(self): tbuf = TransactionBuffer(0) data = [] for i in range(10): data.append((store(tbuf), False)) data.append((store(tbuf, True), True)) for i, (oid, d, resolved) in enumerate(tbuf): self.assertEqual((oid, d), data[i][0]) self.assertEqual(resolved, data[i][1]) tbuf.close()