Skip to content

Commit

Permalink
Add test for issue 8559 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Aug 2, 2022
1 parent e7cb999 commit 6773790
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.models.index import PyPI, TestPyPI
from pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX
from pip._internal.utils.misc import rmtree
from tests.conftest import CertFactory
from tests.lib import (
Expand Down Expand Up @@ -2286,3 +2287,32 @@ def test_install_dry_run(script: PipTestEnvironment, data: TestData) -> None:
)
assert "Would install simple-3.0" in result.stdout
assert "Successfully installed" not in result.stdout


def test_install_8559_missing_wheel_package(
script: PipTestEnvironment, shared_data: TestData
) -> None:
result = script.pip(
"install",
"--find-links",
shared_data.find_links,
"simple",
allow_stderr_warning=True,
)
assert DEPRECATION_MSG_PREFIX in result.stderr
assert "'wheel' package is not installed" in result.stderr
assert "using the legacy 'setup.py install' method" in result.stderr


@pytest.mark.usefixtures("with_wheel")
def test_install_8559_wheel_package_present(
script: PipTestEnvironment, shared_data: TestData
) -> None:
result = script.pip(
"install",
"--find-links",
shared_data.find_links,
"simple",
allow_stderr_warning=False,
)
assert DEPRECATION_MSG_PREFIX not in result.stderr

0 comments on commit 6773790

Please sign in to comment.