Skip to content

Commit 5411211

Browse files
committed
Test deprecation warning
1 parent 7f987b3 commit 5411211

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit/test_models_wheel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from pip._internal.exceptions import InvalidWheelFilename
55
from pip._internal.models.wheel import Wheel
6-
from pip._internal.utils import compatibility_tags
6+
from pip._internal.utils import compatibility_tags, deprecation
77

88

99
class TestWheelFile:
@@ -175,5 +175,6 @@ def test_version_underscore_conversion(self) -> None:
175175
Test that we convert '_' to '-' for versions parsed out of wheel
176176
filenames
177177
"""
178-
w = Wheel("simple-0.1_1-py2-none-any.whl")
178+
with pytest.warns(deprecation.PipDeprecationWarning):
179+
w = Wheel("simple-0.1_1-py2-none-any.whl")
179180
assert w.version == "0.1-1"

0 commit comments

Comments
 (0)