summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-11-09 23:57:34 +0000
committerMichael Williamson <mike@zwobble.org>2013-11-09 23:57:34 +0000
commit048c9763a8459ba3fcb007a2236d561e6e583aed (patch)
treee2b20c5ec04df62e643ffd54d891131065e75751 /tests
parent143b4641a349ed16fc31b4920ff5efa4bf01b7e1 (diff)
downloadpip-048c9763a8459ba3fcb007a2236d561e6e583aed.tar.gz
Add failing test case for installing when there are symlinks to directories
Diffstat (limited to 'tests')
-rw-r--r--tests/data/packages/symlinks/doc/intro0
l---------tests/data/packages/symlinks/docs1
-rw-r--r--tests/data/packages/symlinks/setup.cfg3
-rw-r--r--tests/data/packages/symlinks/setup.py8
-rw-r--r--tests/data/packages/symlinks/symlinks/__init__.py1
-rw-r--r--tests/functional/test_install.py12
6 files changed, 25 insertions, 0 deletions
diff --git a/tests/data/packages/symlinks/doc/intro b/tests/data/packages/symlinks/doc/intro
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/data/packages/symlinks/doc/intro
diff --git a/tests/data/packages/symlinks/docs b/tests/data/packages/symlinks/docs
new file mode 120000
index 000000000..325ab0db6
--- /dev/null
+++ b/tests/data/packages/symlinks/docs
@@ -0,0 +1 @@
+doc \ No newline at end of file
diff --git a/tests/data/packages/symlinks/setup.cfg b/tests/data/packages/symlinks/setup.cfg
new file mode 100644
index 000000000..01bb95449
--- /dev/null
+++ b/tests/data/packages/symlinks/setup.cfg
@@ -0,0 +1,3 @@
+[egg_info]
+tag_build = dev
+tag_svn_revision = true
diff --git a/tests/data/packages/symlinks/setup.py b/tests/data/packages/symlinks/setup.py
new file mode 100644
index 000000000..b71e35f1e
--- /dev/null
+++ b/tests/data/packages/symlinks/setup.py
@@ -0,0 +1,8 @@
+from setuptools import setup
+
+version = '0.1'
+
+setup(name='symlinks',
+ version=version,
+ packages=["symlinks"],
+ )
diff --git a/tests/data/packages/symlinks/symlinks/__init__.py b/tests/data/packages/symlinks/symlinks/__init__.py
new file mode 100644
index 000000000..792d60054
--- /dev/null
+++ b/tests/data/packages/symlinks/symlinks/__init__.py
@@ -0,0 +1 @@
+#
diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py
index bf0ed96c6..4527c96f5 100644
--- a/tests/functional/test_install.py
+++ b/tests/functional/test_install.py
@@ -208,6 +208,18 @@ def test_install_from_local_directory(script, data):
assert egg_info_folder in result.files_created, str(result)
+def test_install_from_local_directory_with_symlinks_to_directories(script, data):
+ """
+ Test installing from a local directory containing symlinks to directories.
+ """
+ to_install = data.packages.join("symlinks")
+ result = script.pip('install', to_install, expect_error=False)
+ pkg_folder = script.site_packages/'symlinks'
+ egg_info_folder = script.site_packages/'symlinks-0.1dev-py%s.egg-info' % pyversion
+ assert pkg_folder in result.files_created, str(result.stdout)
+ assert egg_info_folder in result.files_created, str(result)
+
+
def test_install_from_local_directory_with_no_setup_py(script, data):
"""
Test installing from a local directory with no 'setup.py'.