Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 25 additions & 22 deletions test/integration/targets/pip/tasks/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

- 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: inspect the cmd
assert:
that: "'distribute' in remove_distribute.cmd"
# 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: 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"
when: ansible_python.version.major == 2