pipx: add testcase w/ env vars PIPX_xxxx (#5845)

* pipx: add testcase w/ env vars PIPX_xxxx

* add note to the docs about env vars

* add note to the docs about env vars

* Apply suggestions from code review

* Update plugins/modules/pipx.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/pipx_info.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* break long lines into smaller ones

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2023-01-19 09:28:16 +13:00 committed by GitHub
commit 1430ed000c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 0 deletions

View file

@ -230,3 +230,30 @@
that:
- install_jupyter is changed
- '"ipython" in install_jupyter.stdout'
##############################################################################
- name: ensure /opt/pipx
ansible.builtin.file:
path: /opt/pipx
state: directory
mode: 0755
- name: install tox site-wide
community.general.pipx:
name: tox
state: latest
register: install_tox_sitewide
environment:
PIPX_HOME: /opt/pipx
PIPX_BIN_DIR: /usr/local/bin
- name: stat /usr/local/bin/tox
ansible.builtin.stat:
path: /usr/local/bin/tox
register: usrlocaltox
- name: check assertions
ansible.builtin.assert:
that:
- install_tox_sitewide is changed
- usrlocaltox.stat.exists