Skip to content

Commit 63897d3

Browse files
committed
Don't use legacy version numbers in tests
1 parent 5817ef2 commit 63897d3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

tests/data/packages/README.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ broken-0.1.tar.gz
66
-----------------
77
This package exists for testing uninstall-rollback.
88

9-
broken-0.2broken.tar.gz
10-
-----------------------
11-
Version 0.2broken has a setup.py crafted to fail on install (and only on
9+
broken-0.2.tar.gz
10+
-----------------
11+
Version 0.2 has a setup.py crafted to fail on install (and only on
1212
install). If any earlier step would fail (i.e. egg-info-generation), the
1313
already-installed version would never be uninstalled, so uninstall-rollback
1414
would not come into play.

tests/functional/test_install_upgrade.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -288,17 +288,19 @@ def test_uninstall_rollback(script: PipTestEnvironment, data: TestData) -> None:
288288
crafted to fail on install).
289289
290290
"""
291+
# installing broken 0.1 succeeds
291292
result = script.pip("install", "-f", data.find_links, "--no-index", "broken==0.1")
293+
# installing broken 0.2 fails because it's setup.py is broken
292294
result.did_create(script.site_packages / "broken.py")
293295
result2 = script.pip(
294296
"install",
295297
"-f",
296298
data.find_links,
297299
"--no-index",
298-
"broken===0.2broken",
300+
"broken===0.2",
299301
expect_error=True,
300302
)
301-
assert result2.returncode == 1, str(result2)
303+
assert result2.returncode != 0, str(result2)
302304
assert (
303305
script.run("python", "-c", "import broken; print(broken.VERSION)").stdout
304306
== "0.1\n"

0 commit comments

Comments
 (0)