Beispiel #1
0
 def print_list(self):
     try:
         self.lock.acquire()
         CircularLinkedList.print_list(self)
     finally:
         self.lock.release()
Beispiel #2
0
 def test_iter(self):
     llist = CircularLinkedList()
     llist.append('A')
     llist.append('B')
     llist.print_list()
     self.assertEqual(llist.to_list(), ['A', 'B'])