Example #1
0
 def test_len_1(self):
     n1 = Node(1)
     s_list = LinkedList()
     s_list.add_in_tail(n1)
     data = s_list.len()
     res = 1
     self.assertEqual(data, res)
Example #2
0
 def test_len_3(self):
     n1 = Node(1)
     n2 = Node(3)
     n3 = Node(3)
     s_list = LinkedList()
     s_list.add_in_tail(n1)
     s_list.add_in_tail(n2)
     s_list.add_in_tail(n3)
     data = s_list.len()
     res = 3
     self.assertEqual(data, res)
Example #3
0
 def test_len_0(self):
     s_list = LinkedList()
     data = s_list.len()
     res = 0
     self.assertEqual(data, res)