|
12 | 12 |
|
13 | 13 | from pip._internal.cli.status_codes import ERROR, SUCCESS
|
14 | 14 | from pip._internal.models.index import PyPI, TestPyPI
|
| 15 | +from pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX |
15 | 16 | from pip._internal.utils.misc import rmtree
|
16 | 17 | from tests.conftest import CertFactory
|
17 | 18 | from tests.lib import (
|
@@ -2286,3 +2287,32 @@ def test_install_dry_run(script: PipTestEnvironment, data: TestData) -> None:
|
2286 | 2287 | )
|
2287 | 2288 | assert "Would install simple-3.0" in result.stdout
|
2288 | 2289 | assert "Successfully installed" not in result.stdout
|
| 2290 | + |
| 2291 | + |
| 2292 | +def test_install_8559_missing_wheel_package( |
| 2293 | + script: PipTestEnvironment, shared_data: TestData |
| 2294 | +) -> None: |
| 2295 | + result = script.pip( |
| 2296 | + "install", |
| 2297 | + "--find-links", |
| 2298 | + shared_data.find_links, |
| 2299 | + "simple", |
| 2300 | + allow_stderr_warning=True, |
| 2301 | + ) |
| 2302 | + assert DEPRECATION_MSG_PREFIX in result.stderr |
| 2303 | + assert "'wheel' package is not installed" in result.stderr |
| 2304 | + assert "using the legacy 'setup.py install' method" in result.stderr |
| 2305 | + |
| 2306 | + |
| 2307 | +@pytest.mark.usefixtures("with_wheel") |
| 2308 | +def test_install_8559_wheel_package_present( |
| 2309 | + script: PipTestEnvironment, shared_data: TestData |
| 2310 | +) -> None: |
| 2311 | + result = script.pip( |
| 2312 | + "install", |
| 2313 | + "--find-links", |
| 2314 | + shared_data.find_links, |
| 2315 | + "simple", |
| 2316 | + allow_stderr_warning=False, |
| 2317 | + ) |
| 2318 | + assert DEPRECATION_MSG_PREFIX not in result.stderr |
0 commit comments