diff options
Diffstat (limited to 'tests/functional/test_install_reqs.py')
-rw-r--r-- | tests/functional/test_install_reqs.py | 20 |
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) |