def test_pop_fail():
    """Test pop function on empty queue."""
    from priority import Priority
    new_p_q = Priority()
    with pytest.raises(IndexError):
        new_p_q.pop()
def test_pop():
    """Test pop function on populated queue."""
    from priority import Priority
    new_p_q = Priority([("monkey", 1), ("cat", 2), ("dog", 1)])
    assert new_p_q.pop() == ("monkey")