Exemple #1
0
 def test_7(self):
     """ Check that length returns the size of queue """
     q = Queue()
     n1 = Node(1)
     n2 = Node(2)
     q.enqueue(n1)
     q.enqueue(n2)
     self.assertEqual(q.length(), 2)
Exemple #2
0
 def test_8(self):
     """ Check that length returns 0 if no nodes """
     q = Queue()
     self.assertEqual(q.length(), 0)