Skip to content

Commit

Permalink
Ensure we're not mishandling local indexes
Browse files Browse the repository at this point in the history
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
  • Loading branch information
pradyunsg committed Nov 19, 2020
1 parent c8f7d8c commit cdbb2ba
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/functional/test_new_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,3 +1172,29 @@ def test_new_resolver_does_reinstall_local_paths(script):
)
assert "Installing collected packages: pkg" in result.stdout, str(result)
assert_installed(script, pkg="1.0")


def test_new_resolver_does_not_reinstall_when_from_a_local_index(script):
create_basic_wheel_for_package(
script,
"simple",
"0.1.0",
)
script.pip(
"install",
"--no-cache-dir", "--no-index",
"--find-links", script.scratch_path,
"simple"
)
assert_installed(script, simple="0.1.0")

result = script.pip(
"install",
"--no-cache-dir", "--no-index",
"--find-links", script.scratch_path,
"simple"
)
# Should not reinstall!
assert "Installing collected packages: simple" not in result.stdout, str(result)
assert "Requirement already satisfied: simple" in result.stdout, str(result)
assert_installed(script, simple="0.1.0")

0 comments on commit cdbb2ba

Please sign in to comment.