mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
35027f278b
Tested locally: ===================================================== ================== Running pep8 ===================== Searching for pep8 Reading http://pypi.python.org/simple/pep8/ Reading http://github.com/cburroughs/pep8.py/tree/master Reading http://github.com/jcrocholl/pep8 Best match: pep8 0.6.1 Processing pep8-0.6.1-py2.7.egg pep8 0.6.1 is already the active version in easy-install.pth Installing pep8 script to /Users/pnasrat/Development/pip/pip_virtualenv/bin Using /Users/pnasrat/Development/pip/pip_virtualenv/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg Processing dependencies for pep8 Finished processing dependencies for pep8 ==================== Ended pep8 ===================== =====================================================
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
from os.path import join
|
|
|
|
from tests.test_pip import reset_env, run_pip
|
|
|
|
|
|
def test_simple_extras_install_from_pypi():
|
|
"""
|
|
Test installing a package from PyPI using extras dependency Paste[openid].
|
|
"""
|
|
e = reset_env()
|
|
result = run_pip('install', 'Paste[openid]==1.7.5.1', expect_stderr=True)
|
|
initools_folder = e.site_packages / 'openid'
|
|
assert initools_folder in result.files_created, result.files_created
|
|
|
|
|
|
def test_no_extras_uninstall():
|
|
"""
|
|
No extras dependency gets uninstalled when the root package is uninstalled
|
|
"""
|
|
env = reset_env()
|
|
result = run_pip('install', 'Paste[openid]==1.7.5.1', expect_stderr=True)
|
|
assert join(env.site_packages, 'paste') in result.files_created, sorted(result.files_created.keys())
|
|
assert join(env.site_packages, 'openid') in result.files_created, sorted(result.files_created.keys())
|
|
result2 = run_pip('uninstall', 'Paste', '-y')
|
|
# openid should not be uninstalled
|
|
initools_folder = env.site_packages / 'openid'
|
|
assert not initools_folder in result2.files_deleted, result.files_deleted
|