Skip to content

Commit 012d679

Browse files
committed
Add a failing test for upgrading a distribution with invalid metadata
1 parent e6ae46d commit 012d679

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/functional/test_invalid_versions_and_specifiers.py

+12
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ def test_upgrade_invalid_version(script: PipTestEnvironment, data: TestData) ->
8282
script.pip("install", "--index-url", index_url, "invalid-version")
8383

8484

85+
@pytest.mark.xfail
86+
def test_upgrade_require_invalid_version(
87+
script: PipTestEnvironment, data: TestData
88+
) -> None:
89+
"""
90+
Test that it is possible to upgrade a distribution with an invalid metadata.
91+
"""
92+
_install_require_invalid_version(script, data)
93+
index_url = data.index_url("require-invalid-version")
94+
script.pip("install", "--index-url", index_url, "require-invalid-version")
95+
96+
8597
def test_list_invalid_version(script: PipTestEnvironment, data: TestData) -> None:
8698
"""
8799
Test that pip can list an environment containing a package with a legacy version.

0 commit comments

Comments
 (0)