From 53ce9b66ac8ad629b0cfbe77300136f093f4faae Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Fri, 5 Jun 2020 00:09:14 +0800 Subject: [PATCH] Add failing test for bug found --- tests/functional/test_new_resolver.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/functional/test_new_resolver.py b/tests/functional/test_new_resolver.py index f235feeb8..6d0b7dc6b 100644 --- a/tests/functional/test_new_resolver.py +++ b/tests/functional/test_new_resolver.py @@ -901,3 +901,25 @@ def test_new_resolver_build_directory_error_zazo_19(script): "pkg-a", "pkg-b", ) assert_installed(script, pkg_a="3.0.0", pkg_b="1.0.0") + + +def test_new_resolver_upgrade_same_version(script): + create_basic_wheel_for_package(script, "pkg", "2") + create_basic_wheel_for_package(script, "pkg", "1") + + script.pip( + "install", "--unstable-feature=resolver", + "--no-cache-dir", "--no-index", + "--find-links", script.scratch_path, + "pkg", + ) + assert_installed(script, pkg="2") + + script.pip( + "install", "--unstable-feature=resolver", + "--no-cache-dir", "--no-index", + "--find-links", script.scratch_path, + "--upgrade", + "pkg", + ) + assert_installed(script, pkg="2")