pip tests: skip distribute test case for py3 compat (#49636)

(cherry picked from commit 28a903a1e2)
pull/49699/head
Jordan Borean 7 years ago committed by Toshio Kuratomi
parent c7677eee83
commit 46fc6caf52

@ -501,25 +501,28 @@
state: absent state: absent
# https://github.com/ansible/ansible/issues/47198 # https://github.com/ansible/ansible/issues/47198
- name: make sure the virtualenv does not exist # distribute is a legacy package that will fail on newer Python 3 versions
file: - block:
state: absent - name: make sure the virtualenv does not exist
name: "{{ output_dir }}/pipenv" file:
state: absent
- name: install distribute in the virtualenv name: "{{ output_dir }}/pipenv"
pip:
name: distribute - name: install distribute in the virtualenv
virtualenv: "{{ output_dir }}/pipenv" pip:
state: present name: distribute
virtualenv: "{{ output_dir }}/pipenv"
- name: try to remove distribute state: present
pip:
state: "absent" - name: try to remove distribute
name: "distribute" pip:
virtualenv: "{{ output_dir }}/pipenv" state: "absent"
ignore_errors: yes name: "distribute"
register: remove_distribute virtualenv: "{{ output_dir }}/pipenv"
ignore_errors: yes
- name: inspect the cmd register: remove_distribute
assert:
that: "'distribute' in remove_distribute.cmd" - name: inspect the cmd
assert:
that: "'distribute' in remove_distribute.cmd"
when: ansible_python.version.major == 2

Loading…
Cancel
Save