mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-08 19:53:12 +00:00
pip tests: skip distribute test case for py3 compat (#49636)
This commit is contained in:
@@ -501,25 +501,28 @@
|
||||
state: absent
|
||||
|
||||
# https://github.com/ansible/ansible/issues/47198
|
||||
- name: make sure the virtualenv does not exist
|
||||
file:
|
||||
state: absent
|
||||
name: "{{ output_dir }}/pipenv"
|
||||
# distribute is a legacy package that will fail on newer Python 3 versions
|
||||
- block:
|
||||
- name: make sure the virtualenv does not exist
|
||||
file:
|
||||
state: absent
|
||||
name: "{{ output_dir }}/pipenv"
|
||||
|
||||
- name: install distribute in the virtualenv
|
||||
pip:
|
||||
name: distribute
|
||||
virtualenv: "{{ output_dir }}/pipenv"
|
||||
state: present
|
||||
- name: install distribute in the virtualenv
|
||||
pip:
|
||||
name: distribute
|
||||
virtualenv: "{{ output_dir }}/pipenv"
|
||||
state: present
|
||||
|
||||
- name: try to remove distribute
|
||||
pip:
|
||||
state: "absent"
|
||||
name: "distribute"
|
||||
virtualenv: "{{ output_dir }}/pipenv"
|
||||
ignore_errors: yes
|
||||
register: remove_distribute
|
||||
- name: try to remove distribute
|
||||
pip:
|
||||
state: "absent"
|
||||
name: "distribute"
|
||||
virtualenv: "{{ output_dir }}/pipenv"
|
||||
ignore_errors: yes
|
||||
register: remove_distribute
|
||||
|
||||
- name: inspect the cmd
|
||||
assert:
|
||||
that: "'distribute' in remove_distribute.cmd"
|
||||
- name: inspect the cmd
|
||||
assert:
|
||||
that: "'distribute' in remove_distribute.cmd"
|
||||
when: ansible_python.version.major == 2
|
||||
|
||||
Reference in New Issue
Block a user