mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
[PR #10189/24056110 backport][stable-10] pipx: Add example for installing package with dependency group (#10258)
pipx: Add example for installing package with dependency group (#10189)
* Add example for installing package with dependency group
* add tests
(cherry picked from commit 2405611092
)
Co-authored-by: Robin <robin@rkslot.nl>
This commit is contained in:
parent
7cd8f6edff
commit
d5465ff471
2 changed files with 36 additions and 6 deletions
|
@ -175,6 +175,12 @@ EXAMPLES = r"""
|
||||||
name: tox
|
name: tox
|
||||||
state: upgrade
|
state: upgrade
|
||||||
|
|
||||||
|
- name: Install or upgrade tox with dependency group 'docs'
|
||||||
|
community.general.pipx:
|
||||||
|
name: tox
|
||||||
|
source: tox[docs]
|
||||||
|
state: latest
|
||||||
|
|
||||||
- name: Reinstall black with specific Python version
|
- name: Reinstall black with specific Python version
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
name: black
|
name: black
|
||||||
|
|
|
@ -179,7 +179,7 @@
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
state: absent
|
state: absent
|
||||||
name: tox
|
name: tox
|
||||||
register: uninstall_tox_latest
|
register: uninstall_tox_1
|
||||||
|
|
||||||
- name: install application tox 3.24.0 for latest
|
- name: install application tox 3.24.0 for latest
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
|
@ -223,7 +223,27 @@
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
state: absent
|
state: absent
|
||||||
name: tox
|
name: tox
|
||||||
register: uninstall_tox_latest_yet_again
|
register: uninstall_tox_2
|
||||||
|
|
||||||
|
- name: install tox with dependency group 'docs'
|
||||||
|
community.general.pipx:
|
||||||
|
name: tox
|
||||||
|
source: tox[docs]
|
||||||
|
state: latest
|
||||||
|
register: install_tox_latest_docs
|
||||||
|
|
||||||
|
- name: install tox with dependency group 'docs' again
|
||||||
|
community.general.pipx:
|
||||||
|
name: tox
|
||||||
|
source: tox[docs]
|
||||||
|
state: latest
|
||||||
|
register: install_tox_latest_docs_again
|
||||||
|
|
||||||
|
- name: cleanup tox latest yet again
|
||||||
|
community.general.pipx:
|
||||||
|
state: absent
|
||||||
|
name: tox
|
||||||
|
register: uninstall_tox_3
|
||||||
|
|
||||||
- name: check assertions tox latest
|
- name: check assertions tox latest
|
||||||
assert:
|
assert:
|
||||||
|
@ -231,8 +251,8 @@
|
||||||
- install_tox_latest is changed
|
- install_tox_latest is changed
|
||||||
- "'tox' in install_tox_latest.application"
|
- "'tox' in install_tox_latest.application"
|
||||||
- install_tox_latest.application.tox.version != '3.24.0'
|
- install_tox_latest.application.tox.version != '3.24.0'
|
||||||
- uninstall_tox_latest is changed
|
- uninstall_tox_1 is changed
|
||||||
- "'tox' not in uninstall_tox_latest.application"
|
- "'tox' not in uninstall_tox_1.application"
|
||||||
- install_tox_324_for_latest is changed
|
- install_tox_324_for_latest is changed
|
||||||
- "'tox' in install_tox_324_for_latest.application"
|
- "'tox' in install_tox_324_for_latest.application"
|
||||||
- install_tox_324_for_latest.application.tox.version == '3.24.0'
|
- install_tox_324_for_latest.application.tox.version == '3.24.0'
|
||||||
|
@ -241,8 +261,12 @@
|
||||||
- install_tox_latest_with_preinstall.application.tox.version != '3.24.0'
|
- install_tox_latest_with_preinstall.application.tox.version != '3.24.0'
|
||||||
- install_tox_latest_with_preinstall_again is not changed
|
- install_tox_latest_with_preinstall_again is not changed
|
||||||
- install_tox_latest_with_preinstall_again_force is changed
|
- install_tox_latest_with_preinstall_again_force is changed
|
||||||
- uninstall_tox_latest_again is changed
|
- uninstall_tox_2 is changed
|
||||||
- "'tox' not in uninstall_tox_latest_again.application"
|
- "'tox' not in uninstall_tox_2.application"
|
||||||
|
- install_tox_latest_docs is changed
|
||||||
|
- install_tox_latest_docs_again is not changed
|
||||||
|
- uninstall_tox_3 is changed
|
||||||
|
- "'tox' not in uninstall_tox_3.application"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Test version specifiers in name parameter
|
# Test version specifiers in name parameter
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue