def test_duplicates_sort_ok(data):
    finder = PackageFinder(
        [data.find_links, data.find_links2],
        [],
        session=PipSession(),
    )
    req = InstallRequirement.from_line("duplicate")
    found = finder.find_requirement(req, False)

    assert found.url.endswith("duplicate-1.0.tar.gz"), found
Closes the IMAP4 handle
dataset/ETHPy150Open pypa/pip/tests/unit/test_finder.py/test_duplicates_sort_ok--crossover with--dataset/ETHPy150Open codekoala/django-articles/articles/management/commands/check_for_articles_from_email.py/IMAPHandler.disconnect