Skip to content

Commit

Permalink
Test deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Aug 16, 2024
1 parent 7f987b3 commit 5411211
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/test_models_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from pip._internal.exceptions import InvalidWheelFilename
from pip._internal.models.wheel import Wheel
from pip._internal.utils import compatibility_tags
from pip._internal.utils import compatibility_tags, deprecation


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

0 comments on commit 5411211

Please sign in to comment.