Repository: pypa/pip
File: tests/functional/test_install.py (Python)

Code before:
    result.assert_installed("testpackage", with_files=[".hg"])


@need_bzr
def test_install_editable_from_bazaar(script: PipTestEnvironment) -> None:
    """Test checking out from Bazaar."""
    pkg_path = _create_test_package(
        script.scratch_path, name="testpackage", vcs="bazaar"
    )
    args = [
        "install",
        "-e",
        f"bzr+{pkg_path.as_uri()}/#egg=testpackage",
    ]
    result = script.pip(*args)
    result.assert_installed("testpackage", with_files=[".bzr"])


@pytest.mark.network
def test_vcs_url_urlquote_normalization(script: PipTestEnvironment) -> None:
    """
    Test that urlquoted characters are normalized for repo URL comparison.
    """
    pkg_path = _create_test_package(
        script.scratch_path, name="django_wikiapp", vcs="git"
    )
    url = f"git+{pkg_path.as_uri().replace('django_', 'django%5F')}/#egg=django_wikiapp"
    script.pip("install", "-e", url)


@pytest.mark.parametrize("resolver", ["", "--use-deprecated=legacy-resolver"])
def test_basic_install_from_local_directory(
    script: PipTestEnvironment, data: TestData, resolver: str
) -> None:
    """
    Test installing from a local directory.
    """
    args = ["install"]
    if resolver:
        args.append(resolver)
    to_install = data.packages.joinpath("FSPkg")
    args.append(os.fspath(to_install))
    result = script.pip(*args)
    fspkg_folder = script.site_packages / "fspkg"
    dist_info_folder = script.site_packages / "FSPkg-0.1.dev0.dist-info"
    result.did_create(fspkg_folder)
    result.did_create(dist_info_folder)


@pytest.mark.parametrize(
    "test_type,editable",

Review comment (bug):
The `_create_test_package` helper is pretty rudimentary and will produce a package with broken entry-points if I use a dash (causing setuptools to loudly complain during package building), thus I had to switch it out for an underscore. Same idea, but different character. 

Code after:
    result.assert_installed("testpackage", with_files=[".hg"])


@need_bzr
def test_install_editable_from_bazaar(script: PipTestEnvironment) -> None:
    """Test checking out from Bazaar."""
    pkg_path = _create_test_package(
        script.scratch_path, name="testpackage", vcs="bazaar"
    )
    args = [
        "install",
        "-e",
        f"bzr+{pkg_path.as_uri()}/#egg=testpackage",
    ]
    result = script.pip(*args)
    result.assert_installed("testpackage", with_files=[".bzr"])


def test_vcs_url_urlquote_normalization(script: PipTestEnvironment) -> None:
    """
    Test that urlquoted characters are normalized for repo URL comparison.
    """
    pkg_path = _create_test_package(
        script.scratch_path, name="django_wikiapp", vcs="git"
    )
    url = f"git+{pkg_path.as_uri().replace('django_', 'django%5F')}/#egg=django_wikiapp"
    script.pip("install", "-e", url)


@pytest.mark.parametrize("resolver", ["", "--use-deprecated=legacy-resolver"])
def test_basic_install_from_local_directory(
    script: PipTestEnvironment, data: TestData, resolver: str
) -> None:
    """
    Test installing from a local directory.
    """
    args = ["install"]
    if resolver:
        args.append(resolver)
    to_install = data.packages.joinpath("FSPkg")
    args.append(os.fspath(to_install))
    result = script.pip(*args)
    fspkg_folder = script.site_packages / "fspkg"
    dist_info_folder = script.site_packages / "fspkg-0.1.dev0.dist-info"
    result.did_create(fspkg_folder)
    result.did_create(dist_info_folder)


@pytest.mark.parametrize(
    "test_type,editable",
    [