From 71d7538bdf7143e0df38783d55706d6a694459aa Mon Sep 17 00:00:00 2001 From: Mariam Ahhttouche Date: Thu, 12 Feb 2026 17:27:25 +0100 Subject: [PATCH] uv_python module: add integration tests for version format --- .../targets/uv_python/tasks/main.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/uv_python/tasks/main.yaml b/tests/integration/targets/uv_python/tasks/main.yaml index 02e3e1795a..ebf6b4a690 100644 --- a/tests/integration/targets/uv_python/tasks/main.yaml +++ b/tests/integration/targets/uv_python/tasks/main.yaml @@ -17,7 +17,7 @@ uv_python: version: 3.14 state: present -- name: Re-install python 3.14 +- name: Re-install python 3.14 # installs latest patch version for 3.14 uv_python: version: 3.14 state: present @@ -29,7 +29,7 @@ uv_python: version: 3.13.5 state: present -- name: Remove unexisting python 3.15 +- name: Remove unexisting python 3.15 # removes latest patch version for 3.15 if exists uv_python: version: 3.15 state: absent @@ -44,4 +44,15 @@ - name: Remove python 3.13.5 again uv_python: version: 3.13.5 - state: absent \ No newline at end of file + state: absent +- name: Install python 3 + uv_python: + version: 3 + state: present + register: result + ignore_errors: true +- name: Assert invalid version failed + ansible.builtin.assert: + that: + - result is failed + - "'Expected X.Y or X.Y.Z' in result.msg" \ No newline at end of file