def test_Queue_dequeue_multiple_items(): my_queue = Queue() my_queue.enqueue(1) my_queue.enqueue(2) my_queue.enqueue(3) my_queue.dequeue() actual = my_queue.dequeue() expected = 2 assert actual == expected
def test_Queue_isEmpty_not_empty(): my_queue = Queue() my_queue.enqueue(1) my_queue.enqueue(2) my_queue.enqueue(3) actual = my_queue.is_empty() expected = False assert actual == expected
def test_Queue_peek_front(): my_queue = Queue() my_queue.enqueue(1) my_queue.enqueue(2) my_queue.enqueue(3) actual = my_queue.peek() expected = 1 assert actual == expected
def test_Queue_enqueue_multiple_items(): my_queue = Queue() my_queue.enqueue(1) my_queue.enqueue(2) my_queue.enqueue(3) actual = my_queue.peek() expected = 1 assert actual == expected
def test_Queue_isEmpty_empty(): my_queue = Queue() actual = my_queue.is_empty() expected = True assert actual == expected
def test_Queue_peek_empty_Exception(): with pytest.raises(AttributeError): my_queue = Queue() actual = my_queue.peek() expected = "Can't peek front from an empty queue" assert actual == expected
def test_Queue_dequeue_one_item(): my_queue = Queue() my_queue.enqueue(1) actual = my_queue.dequeue() expected = 1 assert actual == expected
def test_Queue_exists(): assert Queue()