-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test_install_editable_uninstalls_existing
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,6 +228,33 @@ 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 | ||
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"), | ||
), | ||
# @todo: Why do other tests specify `expect_error=True`? | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Ivoz
Contributor
|
||
) | ||
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 | ||
|
||
|
||
def test_install_editable_from_hg(script, tmpdir): | ||
""" | ||
Test cloning from Mercurial. | ||
|
Do I need to specify
expect_error=True
as well?I'll remove this once I find out the answer.