Пример #1
0
 def test_first(self):
     test_list = DoubleLinkedList()
     for i in range(5):
         test_list.push(i)
     self.assertEqual(test_list.first(), 0)
     self.assertEqual(test_list.len(), 5)
Пример #2
0
 def test_first_only(self):
     test_list = DoubleLinkedList()
     test_list.push("test")
     self.assertEqual(test_list.first(), "test")
Пример #3
0
 def test_first_empty(self):
     test_list = DoubleLinkedList()
     self.assertEqual(test_list.first(), "list is empty")