Пример #1
0
 def test_front_of_non_empty_queue_returns_first_in_value(self):
     queue = Queue()
     queue.enqueue(0)
     queue.enqueue(1)
     queue.enqueue(2)
     assert queue.front() == 0
     queue.dequeue()
     assert queue.front() == 1
Пример #2
0
 def test_get_front_of_empty_queue_raises_empty_queue_exception(self):
     queue = Queue()
     with raises(Queue.EmptyQueueException):
         queue.front()