summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcus Smith <qwcode@gmail.com>2014-02-02 15:09:32 -0800
committerMarcus Smith <qwcode@gmail.com>2014-02-08 09:17:13 -0800
commit85d68bbf97307b4038328c8e9b079553a61cf867 (patch)
tree81455ddf242c37ec53a2359923bcfdc260147087 /tests
parenta25b3d15c241789384154252a674b17e4196ef7f (diff)
downloadpip-85d68bbf97307b4038328c8e9b079553a61cf867.tar.gz
fixes for downloading wheels (Issue #1112)
Conflicts: pip/req/req_set.py
Diffstat (limited to 'tests')
-rw-r--r--tests/data/packages/colander-0.9.9-py2.py3-none-any.whlbin0 -> 83733 bytes
-rw-r--r--tests/data/packages/translationstring-1.1.tar.gzbin0 -> 28524 bytes
-rw-r--r--tests/functional/test_install_download.py29
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/data/packages/colander-0.9.9-py2.py3-none-any.whl b/tests/data/packages/colander-0.9.9-py2.py3-none-any.whl
new file mode 100644
index 000000000..031718f9c
--- /dev/null
+++ b/tests/data/packages/colander-0.9.9-py2.py3-none-any.whl
Binary files differ
diff --git a/tests/data/packages/translationstring-1.1.tar.gz b/tests/data/packages/translationstring-1.1.tar.gz
new file mode 100644
index 000000000..25370b8f9
--- /dev/null
+++ b/tests/data/packages/translationstring-1.1.tar.gz
Binary files differ
diff --git a/tests/functional/test_install_download.py b/tests/functional/test_install_download.py
index 03ca24135..dd2f8f602 100644
--- a/tests/functional/test_install_download.py
+++ b/tests/functional/test_install_download.py
@@ -1,3 +1,4 @@
+import os
import textwrap
from tests.lib.path import Path
@@ -48,6 +49,34 @@ def test_download_should_download_dependencies(script):
assert script.site_packages/ 'openid' not in result.files_created
+def test_download_wheel_archive(script, data):
+ """
+ It should download a wheel archive path
+ """
+ wheel_filename = 'colander-0.9.9-py2.py3-none-any.whl'
+ wheel_path = os.path.join(data.find_links, wheel_filename)
+ result = script.pip(
+ 'install', wheel_path,
+ '-d', '.', '--no-deps'
+ )
+ assert Path('scratch') / wheel_filename in result.files_created
+
+
+def test_download_should_download_wheel_deps(script, data):
+ """
+ It should download dependencies for wheels(in the scratch path)
+ """
+ wheel_filename = 'colander-0.9.9-py2.py3-none-any.whl'
+ dep_filename = 'translationstring-1.1.tar.gz'
+ wheel_path = os.path.join(data.find_links, wheel_filename)
+ result = script.pip(
+ 'install', wheel_path,
+ '-d', '.', '--find-links', data.find_links, '--no-index'
+ )
+ assert Path('scratch') / wheel_filename in result.files_created
+ assert Path('scratch') / dep_filename in result.files_created
+
+
def test_download_should_skip_existing_files(script):
"""
It should not download files already existing in the scratch dir