Пример #1
0
 def testNextAccess(self):
     """ each next attribute access puts a sig in a global siglist """
     del _siglist[:]
     s = [None] * 4
     for i in range(len(s)):
         s[i] = Signal(i)
     s[1].next  # read access
     s[2].next = 1
     s[2].next
     s[3].next = 0
     s[3].next = 1
     s[3].next = 3
     for i in range(len(s)):
         self.assertEqual(_siglist.count(s[i]), i)
Пример #2
0
 def testNextAccess(self):
     """ each next attribute access puts a sig in a global siglist """
     del _siglist[:]
     s = [None] * 4
     for i in range(len(s)):
         s[i] = Signal(i)
     s[1].next # read access
     s[2].next = 1
     s[2].next
     s[3].next = 0
     s[3].next = 1
     s[3].next = 3
     for i in range(len(s)):
         self.assertEqual(_siglist.count(s[i]), i)