1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Do not fail tests on our own deprecation warnings

This commit is contained in:
Stéphane Bidoul 2022-08-02 12:19:13 +02:00
parent b423c07ff4
commit 58d8dc28cb
No known key found for this signature in database
GPG key ID: BCAB2555446B5B92
2 changed files with 1 additions and 4 deletions

View file

@ -39,7 +39,6 @@ from pip._internal.models.search_scope import SearchScope
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.models.target_python import TargetPython
from pip._internal.network.session import PipSession
from pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX
from tests.lib.venv import VirtualEnvironment
from tests.lib.wheel import make_wheel
@ -474,7 +473,7 @@ def _check_stderr(
if allow_stderr_warning:
continue
if line.startswith("WARNING: ") or line.startswith(DEPRECATION_MSG_PREFIX):
if line.startswith("WARNING: "):
reason = (
"stderr has an unexpected warning "
"(pass allow_stderr_warning=True to permit this)"

View file

@ -150,7 +150,6 @@ class TestPipTestEnvironment:
@pytest.mark.parametrize(
"prefix",
(
"DEPRECATION",
"WARNING",
"ERROR",
),
@ -167,7 +166,6 @@ class TestPipTestEnvironment:
@pytest.mark.parametrize(
"prefix, expected_start",
(
("DEPRECATION", "stderr has an unexpected warning"),
("WARNING", "stderr has an unexpected warning"),
("ERROR", "stderr has an unexpected error"),
),