diff options
author | Matt Clay <mclay@redhat.com> | 2021-09-04 00:17:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-04 00:17:43 +0200 |
commit | de01db08d00c8d2438e1ba5989c313ba16a145b0 (patch) | |
tree | fb57551a10cf0efc643d5cecb59df4c730f5bad2 /test/units/modules | |
parent | AnsiballZ - Make sure cwd is accessible. (#75636) (diff) | |
download | ansible-de01db08d00c8d2438e1ba5989c313ba16a145b0.tar.xz ansible-de01db08d00c8d2438e1ba5989c313ba16a145b0.zip |
pip - Use pip from the current Python interpreter. (#75634)
* pip - Use pip from the current Python interpreter.
If `executable` and `virtualenv` were not specified, and
the `pip` Python module is available for the current interpreter,
use that `pip` module instead of searching for a `pip` command.
* Add comment about needing `__main__` to run `pip`.
* Fix unit test.
* Add porting guide entry.
* Update changelog to match porting guide description.
ci_complete
Diffstat (limited to 'test/units/modules')
-rw-r--r-- | test/units/modules/test_pip.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/units/modules/test_pip.py b/test/units/modules/test_pip.py index 7f0f8b079a..5640b80582 100644 --- a/test/units/modules/test_pip.py +++ b/test/units/modules/test_pip.py @@ -15,6 +15,8 @@ pytestmark = pytest.mark.usefixtures('patch_ansible_module') @pytest.mark.parametrize('patch_ansible_module', [{'name': 'six'}], indirect=['patch_ansible_module']) def test_failure_when_pip_absent(mocker, capfd): + mocker.patch('ansible.modules.pip._have_pip_module').return_value = False + get_bin_path = mocker.patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') get_bin_path.return_value = None |