def test_finder_installs_pre_releases_with_version_spec():
    req = InstallRequirement.from_line("bar>=0.0.dev0", None)
    links = ["https://foo/bar-1.0.tar.gz", "https://foo/bar-2.0b1.tar.gz"]

    finder = PackageFinder(links, [], session=PipSession())

    with patch.object(finder, "_get_pages", lambda x, y: []):
        link = finder.find_requirement(req, False)
        assert link.url == "https://foo/bar-2.0b1.tar.gz"

    links.reverse()
    finder = PackageFinder(links, [], session=PipSession())

    with patch.object(finder, "_get_pages", lambda x, y: []):
        link = finder.find_requirement(req, False)
        assert link.url == "https://foo/bar-2.0b1.tar.gz"
Print a CSV header to the commandline from variables found in a template
dataset/ETHPy150Open pypa/pip/tests/unit/test_finder.py/test_finder_installs_pre_releases_with_version_spec--crossover with--dataset/ETHPy150Open verbosemode/confplate/confplate/confplate.py/Cli.generate_csv_header