diff options
Diffstat (limited to 'yardstick')
-rw-r--r-- | yardstick/common/packages.py | 6 | ||||
-rw-r--r-- | yardstick/tests/functional/common/test_packages.py | 11 | ||||
-rw-r--r-- | yardstick/tests/unit/common/test_packages.py | 4 |
3 files changed, 11 insertions, 10 deletions
diff --git a/yardstick/common/packages.py b/yardstick/common/packages.py index f20217fdc..a128b7428 100644 --- a/yardstick/common/packages.py +++ b/yardstick/common/packages.py @@ -16,8 +16,8 @@ import logging import re import pip -from pip import exceptions as pip_exceptions -from pip.operations import freeze +from pip._internal import exceptions as pip_exceptions +from pip._internal.operations import freeze from yardstick.common import privsep @@ -36,7 +36,7 @@ def _pip_main(package, action, target=None): cmd = [action, package, '--upgrade'] if target: cmd.append('--target=%s' % target) - return pip.main(cmd) + return pip._internal.main(cmd) def _pip_execute_action(package, action=ACTION_INSTALL, target=None): diff --git a/yardstick/tests/functional/common/test_packages.py b/yardstick/tests/functional/common/test_packages.py index 14de46bcf..e15f72898 100644 --- a/yardstick/tests/functional/common/test_packages.py +++ b/yardstick/tests/functional/common/test_packages.py @@ -15,6 +15,7 @@ import os from os import path import re +import unittest from yardstick.common import packages from yardstick.common import utils @@ -69,6 +70,7 @@ class PipPackagesTestCase(base.BaseFunctionalTestCase): self.assertEqual(0, packages.pip_install(package_dir, self.TMP_FOLDER)) self.assertTrue(package_name in self._list_packages()) + @unittest.skip("see https://github.com/pypa/pip/issues/3889") def test_install_from_pip_package(self): dirname = path.dirname(__file__) package_path = (dirname + @@ -89,11 +91,10 @@ class PipPackagesTestCase(base.BaseFunctionalTestCase): # NOTE (ralonsoh): from requirements.txt file. The best way to test # this function is to parse requirements.txt and test-requirements.txt # and check all packages. - pkgs_ref = {'Babel': '2.3.4', - 'SQLAlchemy': '1.1.12', - 'influxdb': '4.1.1', - 'netifaces': '0.10.6', - 'unicodecsv': '0.14.1'} + pkgs_ref = {'Babel': '2.6.0', + 'SQLAlchemy': '1.2.18', + 'influxdb': '5.1.0', + 'netifaces': '0.10.9'} pkgs = packages.pip_list() for name, version in (pkgs_ref.items()): self.assertEqual(version, pkgs[name]) diff --git a/yardstick/tests/unit/common/test_packages.py b/yardstick/tests/unit/common/test_packages.py index ba59a3015..09d76fe44 100644 --- a/yardstick/tests/unit/common/test_packages.py +++ b/yardstick/tests/unit/common/test_packages.py @@ -13,8 +13,8 @@ # limitations under the License. import mock -from pip import exceptions as pip_exceptions -from pip.operations import freeze +from pip._internal import exceptions as pip_exceptions +from pip._internal.operations import freeze import unittest from yardstick.common import packages |