def test_add_already_added(self):
        prio_set_list = event._PrioritizedSetList()
        obj = object()
        prio_set_list.add(0, obj)

        with pytest.raises(ValueError) as excinfo:
            prio_set_list.add(0, obj)
        excinfo.match(r"has already been added")

        with pytest.raises(ValueError) as excinfo:
            prio_set_list.add(1, obj)
        excinfo.match(r"has already been added")
def test_parse_include():
    filepaths, current_line = mariofile.parse_include(INCLUDE_FILE.splitlines(True))
    assert filepaths == ['prova.ini', 'altrofile.ini']
    assert current_line == 4
    filepaths, current_line = mariofile.parse_include(INCLUDE_UNIQUE_FILE.splitlines(True))
    assert filepaths == ['prova.ini']
    assert current_line == 1