mirror of https://github.com/pypa/pip
Ensure root requirement name is canonicalised
This commit is contained in:
parent
df3b440f7b
commit
04bf571521
|
@ -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?
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue