Exemplo n.º 1
0
 def testUndoLogSpansMultipleRecalcs(self):
     c1 = trellis.Value(False, discrete=True)
     c2 = trellis.Cell(lambda: (c1.value, log.append(trellis.savepoint())))
     log = []
     c2.value
     log = []
     c1.value = True
     self.failUnless(len(log) == 2 and log[1] > log[0], log)
Exemplo n.º 2
0
 def testUndoLogSpansMultipleRecalcs(self):
     c1 = trellis.Value(False, discrete=True)
     c2 = trellis.Cell(lambda: (c1.value, log.append(trellis.savepoint())))
     log = []
     c2.value
     log = []
     c1.value = True
     self.failUnless(len(log) == 2 and log[1] > log[0], log)
Exemplo n.º 3
0
 def c2():
     c1.value
     log.append(trellis.savepoint())
     if len(log) == 2:
         raise DummyError
Exemplo n.º 4
0
 def c2():
     c1.value
     log.append(trellis.savepoint())
     if len(log) == 2:
         raise DummyError