mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Fix test_issue_6833_pip_upgrade_pip test on OSX
This commit is contained in:
parent
3c694a371b
commit
4ae8a43435
@ -11,6 +11,7 @@ import glob
|
||||
import shutil
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
@ -130,6 +131,9 @@ def create(path,
|
||||
if venv_bin is None:
|
||||
venv_bin = __opts__.get('venv_bin') or __pillar__.get('venv_bin')
|
||||
|
||||
if not os.path.exists(venv_bin):
|
||||
venv_bin = '/'.join([os.path.dirname(sys.executable), venv_bin])
|
||||
|
||||
cmd = [venv_bin]
|
||||
|
||||
if 'pyvenv' not in venv_bin:
|
||||
|
@ -361,7 +361,6 @@ class PipStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
|
||||
# previously installed
|
||||
ret = self.run_function(
|
||||
'pip.install', ['pip==6.0'], upgrade=True,
|
||||
ignore_installed=True,
|
||||
bin_env=venv_dir
|
||||
)
|
||||
try:
|
||||
@ -375,7 +374,7 @@ class PipStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
|
||||
pprint.pprint(ret)
|
||||
raise
|
||||
|
||||
# Le't make sure we have pip 6.0 installed
|
||||
# Let's make sure we have pip 6.0 installed
|
||||
self.assertEqual(
|
||||
self.run_function('pip.list', ['pip'], bin_env=venv_dir),
|
||||
{'pip': '6.0'}
|
||||
|
Loading…
Reference in New Issue
Block a user