python_requirements_info - fail when version operator used without version (#3785)

* python_requirements_info - fail when version operator used without version

* added changelog fragment

* simplified way of achieving the same result
This commit is contained in:
Alexei Znamensky 2021-11-26 19:09:46 +13:00 committed by GitHub
parent 1cc6938ae3
commit 59c1859fb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

View file

@ -25,3 +25,15 @@
that:
- "'installed' in dep_info.valid.pip"
- "'notreal' in dep_info.not_found"
- name: wrong specs
python_requirements_info:
dependencies:
- ansible<
register: wrong_spec1
ignore_errors: true
- name: ensure wrong specs return error
assert:
that:
- wrong_spec1 is failed