Esempio 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)
Esempio 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)
Esempio n. 3
0
 def c2():
     c1.value
     log.append(trellis.savepoint())
     if len(log) == 2:
         raise DummyError
Esempio n. 4
0
 def c2():
     c1.value
     log.append(trellis.savepoint())
     if len(log) == 2:
         raise DummyError