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