def METHOD_NAME(self, tmp_path):
    # overriding sections in the same file throws an exception from configparser
    (path := tmp_path / "file").write_text(
        textwrap.dedent(
            """\
        [DEFAULT]
        main-repo = foo
        [foo]
        priority = 3
        location = /var/gentoo/repos/gentoo
        [foo]
        location = /var/gentoo/repos/foo"""
        )
    )
    with pytest.raises(config_errors.ConfigurationError):
        load_repos_conf(path)