1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 05:09:12 +00:00

Handle case when version given is an empty string in uv_python module

This commit is contained in:
Mariam Ahhttouche 2026-03-06 17:44:41 +00:00
parent 722c9441c5
commit a21646d398
2 changed files with 18 additions and 4 deletions

View file

@ -257,10 +257,25 @@
- name: No specified version
uv_python:
state: latest
version: ""
ignore_errors: true
register: no_version
- name: Verify failure when no version is specified
assert:
that:
- no_version.failed is true
- no_version.failed is true
- '"Unsupported version format" in no_version.msg'
- name: Unsupported version format given
uv_python:
state: latest
version: "3.8.post2"
ignore_errors: true
register: wrong_version
- name: Verify failure when unsupported version format is specified
assert:
that:
- wrong_version.failed is true
- '"Unsupported version format" in wrong_version.msg'