Skip to content

Commit 58d8dc2

Browse files
committed
Do not fail tests on our own deprecation warnings
1 parent b423c07 commit 58d8dc2

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

tests/lib/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from pip._internal.models.selection_prefs import SelectionPreferences
4040
from pip._internal.models.target_python import TargetPython
4141
from pip._internal.network.session import PipSession
42-
from pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX
4342
from tests.lib.venv import VirtualEnvironment
4443
from tests.lib.wheel import make_wheel
4544

@@ -474,7 +473,7 @@ def _check_stderr(
474473
if allow_stderr_warning:
475474
continue
476475

477-
if line.startswith("WARNING: ") or line.startswith(DEPRECATION_MSG_PREFIX):
476+
if line.startswith("WARNING: "):
478477
reason = (
479478
"stderr has an unexpected warning "
480479
"(pass allow_stderr_warning=True to permit this)"

tests/lib/test_lib.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def test_run__allow_stderr_warning(self, script: PipTestEnvironment) -> None:
150150
@pytest.mark.parametrize(
151151
"prefix",
152152
(
153-
"DEPRECATION",
154153
"WARNING",
155154
"ERROR",
156155
),
@@ -167,7 +166,6 @@ def test_run__allow_stderr_error(
167166
@pytest.mark.parametrize(
168167
"prefix, expected_start",
169168
(
170-
("DEPRECATION", "stderr has an unexpected warning"),
171169
("WARNING", "stderr has an unexpected warning"),
172170
("ERROR", "stderr has an unexpected error"),
173171
),

0 commit comments

Comments
 (0)