-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[issue 1548] Make pip install -e uninstall existing versions #1552
Changes from all commits
41dbd97
3870586
5b62075
36cffa0
bfca0f6
3e0d727
37bed20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,6 +228,32 @@ def test_install_editable_from_git(script, tmpdir): | |
result.assert_installed('pip-test-package', with_files=['.git']) | ||
|
||
|
||
def test_install_editable_uninstalls_existing(data, script, tmpdir): | ||
""" | ||
Test that installing an editable uninstalls a previously installed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a second test that deals with a non-vcs "-e " install would be ideal, to confirm that also works as we'd want. |
||
non-editable version. | ||
https://github.com/pypa/pip/issues/1548 | ||
https://github.com/pypa/pip/pull/1552 | ||
""" | ||
to_install = data.packages.join("pip-test-package-0.1.tar.gz") | ||
result = script.pip_install_local(to_install) | ||
assert 'Successfully installed pip-test-package' in result.stdout | ||
result.assert_installed('piptestpackage', editable=False) | ||
|
||
result = script.pip( | ||
'install', '-e', | ||
'%s#egg=pip-test-package' % | ||
local_checkout( | ||
'git+http://github.com/pypa/pip-test-package.git', | ||
tmpdir.join("cache"), | ||
), | ||
) | ||
result.assert_installed('pip-test-package', with_files=['.git']) | ||
assert 'Found existing installation: pip-test-package 0.1' in result.stdout | ||
assert 'Uninstalling pip-test-package:' in result.stdout | ||
assert 'Successfully uninstalled pip-test-package' in result.stdout | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, would be better if you could confirm the package is removed from site-packages using |
||
|
||
|
||
def test_install_editable_from_hg(script, tmpdir): | ||
""" | ||
Test cloning from Mercurial. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd like to set
self.satisfied_by
back to None after this.and add a comment that says something like "when installing editables, nothing pre-existing should ever satisfy"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, see 5b62075. Thanks!