def test_peek(populated_pq, insert_item, result_pq): from priorityq import PriorityQueue pq = PriorityQueue() pq._container = result_pq assert pq.peek() == result_pq[0]
def test_pop(populated_pq, pop_values): from priorityq import PriorityQueue pq = PriorityQueue() pq._container = populated_pq for i in range(len(pq._container)): assert pq.pop() == pop_values[i]
def test_insert(populated_pq, insert_item, result_pq): from priorityq import PriorityQueue pq = PriorityQueue() pq._container = populated_pq pq.insert(insert_item) assert pq._container == result_pq
def test_peek(populated_pq, insert_item, result_pq): from priorityq import PriorityQueue pq = PriorityQueue() pq._container = result_pq assert pq.peek() == result_pq[0]
def test_pop(populated_pq, pop_values): from priorityq import PriorityQueue pq = PriorityQueue() pq._container = populated_pq for i in range(len(pq._container)): assert pq.pop() == pop_values[i]
def test_insert(populated_pq, insert_item, result_pq): from priorityq import PriorityQueue pq = PriorityQueue() pq._container = populated_pq pq.insert(insert_item) assert pq._container == result_pq