summaryrefslogtreecommitdiff
path: root/tests/functional/test_install_reqs.py
diff options
context:
space:
mode:
authorXavier Fernandez <xavier.fernandez@polyconseil.fr>2017-05-14 00:23:17 +0200
committerXavier Fernandez <xavier.fernandez@polyconseil.fr>2017-07-21 18:08:53 +0200
commitb709b1ef4a5648f5020d2f66988183ceac56a4a8 (patch)
tree24accb525e13fada3d22ad78a49be6d7e2405a3a /tests/functional/test_install_reqs.py
parent3dd4a0d1ac0508c9b2e812fb650ded6782b087df (diff)
downloadpip-b709b1ef4a5648f5020d2f66988183ceac56a4a8.tar.gz
Add a common_wheels fixtures providing wheel & setuptools wheels
Diffstat (limited to 'tests/functional/test_install_reqs.py')
-rw-r--r--tests/functional/test_install_reqs.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/functional/test_install_reqs.py b/tests/functional/test_install_reqs.py
index 7d8d9a66e..96544f2de 100644
--- a/tests/functional/test_install_reqs.py
+++ b/tests/functional/test_install_reqs.py
@@ -223,10 +223,10 @@ def test_install_local_with_subdirectory(script):
@pytest.mark.network
-def test_wheel_user_with_prefix_in_pydistutils_cfg(script, data, virtualenv):
+def test_wheel_user_with_prefix_in_pydistutils_cfg(
+ script, data, virtualenv, common_wheels):
# Make sure wheel is available in the virtualenv
- script.pip('install', 'wheel')
- script.pip('download', 'setuptools', 'wheel', '-d', data.packages)
+ script.pip('install', 'wheel', '--no-index', '-f', common_wheels)
virtualenv.system_site_packages = True
homedir = script.environ["HOME"]
script.scratch_path.join("bin").mkdir()
@@ -235,8 +235,10 @@ def test_wheel_user_with_prefix_in_pydistutils_cfg(script, data, virtualenv):
[install]
prefix=%s""" % script.scratch_path))
- result = script.pip('install', '--user', '--no-index', '-f',
- data.find_links, 'requiresupper')
+ result = script.pip(
+ 'install', '--user', '--no-index',
+ '-f', data.find_links, '-f', common_wheels,
+ 'requiresupper')
# Check that we are really installing a wheel
assert 'Running setup.py install for requiresupper' not in result.stdout
assert 'installed requiresupper' in result.stdout
@@ -339,7 +341,7 @@ def test_constrained_to_url_install_same_url(script, data):
@pytest.mark.network
-def test_double_install_spurious_hash_mismatch(script, tmpdir, data):
+def test_double_install_spurious_hash_mismatch(script, tmpdir, common_wheels):
"""Make sure installing the same hashed sdist twice doesn't throw hash
mismatch errors.
@@ -349,14 +351,14 @@ def test_double_install_spurious_hash_mismatch(script, tmpdir, data):
causes spurious mismatch errors.
"""
- script.pip('install', 'wheel') # Otherwise, it won't try to build wheels.
- script.pip('download', 'setuptools', 'wheel', '-d', data.packages)
+ # Install wheel package, otherwise, it won't try to build wheels.
+ script.pip('install', 'wheel', '--no-index', '-f', common_wheels)
with requirements_file('simple==1.0 --hash=sha256:393043e672415891885c9a2a'
'0929b1af95fb866d6ca016b42d2e6ce53619b653',
tmpdir) as reqs_file:
# Install a package (and build its wheel):
result = script.pip_install_local(
- '--find-links', data.find_links,
+ '--find-links', data.find_links, '-f', common_wheels,
'-r', reqs_file.abspath, expect_error=False)
assert 'Successfully installed simple-1.0' in str(result)