Ensure root requirement name is canonicalised

This commit is contained in:
Paul Moore 2020-04-24 14:27:24 +01:00
parent df3b440f7b
commit 04bf571521
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ class Factory(object):
def make_requirement_from_install_req(self, ireq, root=False):
# type: (InstallRequirement, bool) -> Requirement
if root and ireq.name:
self.root_reqs.add(ireq.name)
self.root_reqs.add(canonicalize_name(ireq.name))
if ireq.link:
# TODO: Get name and version from ireq, if possible?

View File

@ -561,7 +561,7 @@ def test_new_resolver_upgrade_needs_option(script):
"--no-cache-dir", "--no-index",
"--find-links", script.scratch_path,
"--upgrade",
"pkg",
"PKG", # Deliberately uppercase to check canonicalization
)
assert "Uninstalling pkg-1.0.0" in result.stdout, str(result)