1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Add functional test for local editables with extras.

This commit is contained in:
Nick Stenning 2012-05-24 10:04:16 +01:00
parent df201a4d03
commit 78e4b05c33
4 changed files with 22 additions and 0 deletions

1
tests/packages/LocalExtras/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/LocalExtras.egg-info

View file

@ -0,0 +1,13 @@
import os
from setuptools import setup, find_packages
HERE = os.path.dirname(__file__)
INDEX = os.path.join(HERE, '..', '..', 'in dex', 'FSPkg')
setup(
name='LocalExtras',
version='0.0.1',
packages=find_packages(),
extras_require={ 'bar': ['FSPkg'] },
dependency_links=['file://' + INDEX]
)

View file

@ -162,3 +162,11 @@ def test_parse_editable_local_extras(isdir_mock, exists_mock):
parse_editable('foo[bar,baz]', 'git'),
(None, 'file://' + os.path.join(os.getcwd(), 'foo'), ('bar', 'baz'))
)
def test_install_local_editable_with_extras():
env = reset_env()
to_install = os.path.abspath(os.path.join(here, 'packages', 'LocalExtras'))
res = run_pip('install', '-e', to_install + '[bar]', expect_error=False)
assert env.site_packages/'easy-install.pth' in res.files_updated
assert env.site_packages/'LocalExtras.egg-link' in res.files_created
assert env.site_packages/'fspkg' in res.files_created