From 96aaf3472ed43a90bed6b2fb96c9886b201183e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 29 Sep 2023 23:14:54 +0200 Subject: [PATCH] Don't use legacy version numbers in tests --- tests/data/packages/README.txt | 6 +++--- ...en-0.2broken.tar.gz => broken-0.2+broken.tar.gz} | Bin tests/functional/test_install_upgrade.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename tests/data/packages/{broken-0.2broken.tar.gz => broken-0.2+broken.tar.gz} (100%) diff --git a/tests/data/packages/README.txt b/tests/data/packages/README.txt index aa957b337f0..37860a21b9e 100644 --- a/tests/data/packages/README.txt +++ b/tests/data/packages/README.txt @@ -6,9 +6,9 @@ broken-0.1.tar.gz ----------------- This package exists for testing uninstall-rollback. -broken-0.2broken.tar.gz ------------------------ -Version 0.2broken has a setup.py crafted to fail on install (and only on +broken-0.2+broken.tar.gz +------------------------ +Version 0.2+broken has a setup.py crafted to fail on install (and only on install). If any earlier step would fail (i.e. egg-info-generation), the already-installed version would never be uninstalled, so uninstall-rollback would not come into play. diff --git a/tests/data/packages/broken-0.2broken.tar.gz b/tests/data/packages/broken-0.2+broken.tar.gz similarity index 100% rename from tests/data/packages/broken-0.2broken.tar.gz rename to tests/data/packages/broken-0.2+broken.tar.gz diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py index 09c01d7eb18..ea97477b555 100644 --- a/tests/functional/test_install_upgrade.py +++ b/tests/functional/test_install_upgrade.py @@ -295,7 +295,7 @@ def test_uninstall_rollback(script: PipTestEnvironment, data: TestData) -> None: "-f", data.find_links, "--no-index", - "broken===0.2broken", + "broken===0.2+broken", expect_error=True, ) assert result2.returncode == 1, str(result2)