1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #3885 from xavfernandez/fix_failing_tests

Fix test_download_wheel
This commit is contained in:
Xavier Fernandez 2016-07-31 23:10:11 +02:00 committed by GitHub
commit a1cd8bd1e1
2 changed files with 10 additions and 14 deletions

View file

@ -30,20 +30,18 @@ def test_download_setuptools(script):
)
@pytest.mark.network
def test_download_wheel(script):
def test_download_wheel(script, data):
"""
Test using "pip download" to download a *.whl archive.
FIXME: this test could use a local --find-links dir, but -d with local
--find-links has a bug https://github.com/pypa/pip/issues/1111
"""
result = script.pip(
'download',
'-f', 'https://bitbucket.org/pypa/pip-test-package/downloads',
'-d', '.', 'pip-test-package'
'--no-index',
'-f', data.packages,
'-d', '.', 'meta'
)
assert (
Path('scratch') / 'pip_test_package-0.1.1-py2.py3-none-any.whl'
Path('scratch') / 'meta-1.0-py2.py3-none-any.whl'
in result.files_created
)
assert script.site_packages / 'piptestpackage' not in result.files_created

View file

@ -17,21 +17,19 @@ def test_download_if_requested(script):
assert script.site_packages / 'initools' not in result.files_created
@pytest.mark.network
def test_download_wheel(script):
def test_download_wheel(script, data):
"""
Test using "pip install --download" to download a *.whl archive.
FIXME: this test could use a local --find-links dir, but -d with local
--find-links has a bug https://github.com/pypa/pip/issues/1111
"""
result = script.pip(
'install',
'-f', 'https://bitbucket.org/pypa/pip-test-package/downloads',
'-d', '.', 'pip-test-package',
'--no-index',
'-f', data.packages,
'-d', '.', 'meta',
expect_stderr=True,
)
assert (
Path('scratch') / 'pip_test_package-0.1.1-py2.py3-none-any.whl'
Path('scratch') / 'meta-1.0-py2.py3-none-any.whl'
in result.files_created
)
assert script.site_packages / 'piptestpackage' not in result.files_created