Skip to content

Commit

Permalink
Remove pip 7.x deprecation warnings from test suite (issue #57)
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Sep 22, 2015
1 parent abb9728 commit 0202f6d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions pip_accel/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Tests for the pip accelerator.
#
# Author: Peter Odding <peter.odding@paylogic.com>
# Last Change: September 9, 2015
# Last Change: September 22, 2015
# URL: https://github.com/paylogic/pip-accel

"""
Expand Down Expand Up @@ -312,9 +312,8 @@ def test_wheel_install(self):
wheels_already_supported = accelerator.setuptools_supports_wheels()
# Test the installation of Paver (and the upgrade of Setuptools?).
num_installed = accelerator.install_from_arguments([
# Ugly way to force pip to install from a wheel archive (there is a
# --no-use-wheel option but there is nothing like --force-wheel).
'--ignore-installed', 'https://pypi.python.org/packages/2.7/P/Paver/Paver-1.2.4-py2.py3-none-any.whl'
# We force pip to install from a wheel archive.
'--ignore-installed', '--only-binary=:all:', 'Paver==1.2.4',
])
if wheels_already_supported:
assert num_installed == 1, "Expected pip-accel to install exactly one package!"
Expand All @@ -338,7 +337,7 @@ def test_bdist_fallback(self):
# Install Paver 1.2.3 using pip-accel.
accelerator = self.initialize_pip_accel()
num_installed = accelerator.install_from_arguments([
'--ignore-installed', '--no-use-wheel', 'paver==1.2.3'
'--ignore-installed', '--no-binary=:all:', 'paver==1.2.3'
])
assert num_installed == 1, "Expected pip-accel to install exactly one package!"
# Make sure the Paver program works after installation.
Expand Down Expand Up @@ -367,7 +366,7 @@ def test_installed_files_tracking(self):
# Install the iPython 1.0 source distribution using pip.
command = InstallCommand()
opts, args = command.parse_args([
'--ignore-installed', '--no-use-wheel', 'ipython==1.0'
'--ignore-installed', '--no-binary=:all:', 'ipython==1.0'
])
command.run(opts, args)
# Make sure the iPython program works after installation using pip.
Expand All @@ -383,7 +382,7 @@ def test_installed_files_tracking(self):
# Install the iPython 1.0 source distribution using pip-accel.
accelerator = self.initialize_pip_accel()
num_installed = accelerator.install_from_arguments([
'--ignore-installed', '--no-use-wheel', 'ipython==1.0'
'--ignore-installed', '--no-binary=:all:', 'ipython==1.0'
])
assert num_installed == 1, "Expected pip-accel to install exactly one package!"
# Make sure the iPython program works after installation using pip-accel.
Expand Down Expand Up @@ -418,7 +417,7 @@ def test_setuptools_injection(self):
# Install the docutils 0.12 source distribution using pip-accel.
accelerator = self.initialize_pip_accel()
num_installed = accelerator.install_from_arguments([
'--ignore-installed', '--no-use-wheel', 'docutils==0.12'
'--ignore-installed', '--no-binary=:all:', 'docutils==0.12'
])
assert num_installed == 1, "Expected pip-accel to install exactly one package!"
# Import docutils to find the site-packages directory.
Expand Down Expand Up @@ -471,9 +470,8 @@ def test_requirement_objects(self):
# Make sure Requirement.sdist_metadata raises the expected exception
# when the requirement isn't a source distribution.
requirements = accelerator.get_requirements([
# Ugly way to force pip to install from a wheel archive (there is a
# --no-use-wheel option but there is nothing like --force-wheel).
'--ignore-installed', 'https://pypi.python.org/packages/2.7/P/Paver/Paver-1.2.4-py2.py3-none-any.whl'
# We force pip to install from a wheel archive.
'--ignore-installed', '--only-binary=:all:', 'Paver==1.2.4',
])
self.assertRaises(TypeError, operator.attrgetter('sdist_metadata'), requirements[0])

Expand Down

0 comments on commit 0202f6d

Please sign in to comment.