def test_step(priority_queue: PriorityQueue) -> None: original = deepcopy(priority_queue) result = priority_queue.pop() assert all(not item < priority_queue._item_factory(result) for item in priority_queue._items) assert len(priority_queue) == len(original) - 1
def test_step(priority_queue: PriorityQueue) -> None: result = priority_queue.peek() assert result in priority_queue.values() assert all(not item < priority_queue._item_factory(result) for item in priority_queue._items)