summaryrefslogtreecommitdiff
path: root/tests/functional/test_install_download.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/test_install_download.py')
-rw-r--r--tests/functional/test_install_download.py29
1 files changed, 29 insertions, 0 deletions
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