ansible/test/lib/ansible_test/_data
Gonéri Le Bouder 7cf80f50d1
validate_modules: fails with .id attribute not found (#73322)
* validate_modules: fails with .id attribute not found

This patch addresses a problem in the `found_try_except_import` test.

This module tries to identify lines like:

`HAS_FOO = True`

In this case, the target (`HAS_FOO`) is of type `ast.Name` and has a
`id` attribute which provide the name.

In my case, I've a line that set a module attribute`. In this case, the
target (`module.var`) has the type `ast.Attribute` and no `id`
attribute. The code trigger an `AttributeError` exception.

This patch ensures we compare a `ast.Name`.

* Update test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py
2021-02-02 13:29:36 -08:00
..
cli
completion Overhaul ansible-test SSH key management. (#73451) 2021-02-02 08:43:54 -08:00
injector ansible-test - prefer venv over virtualenv on Python 3 (#73000) 2020-12-17 10:51:42 -05:00
playbooks Internally redirect win modules to collection name (#68317) 2020-03-23 11:14:21 -05:00
pytest/plugins fix collection package root location under pytest >=6.0.0 (#70963) 2020-08-03 17:31:32 -07:00
requirements Limit rstcheck sanity test to ansible-core. (#73391) 2021-01-27 21:06:00 -08:00
sanity validate_modules: fails with .id attribute not found (#73322) 2021-02-02 13:29:36 -08:00
setup Overhaul ansible-test SSH key management. (#73451) 2021-02-02 08:43:54 -08:00
ansible.cfg
collection_detail.py Add deprecated removed_in_version and deprecated_aliases version tests (#66920) 2020-05-13 13:58:09 -07:00
coveragerc
cryptography-constraints.txt Fix cryptography constraints in ansible-test. (#72914) 2020-12-09 10:46:05 -08:00
inventory
pytest.ini Remove em dash from the pytest configuration file 2020-09-14 09:02:48 -07:00
quiet_pip.py Fix ansible-test pip filter on Fedora 32. 2020-06-10 09:37:01 -07:00
sslcheck.py Fix cryptography constraints in ansible-test. (#72914) 2020-12-09 10:46:05 -08:00
versions.py Ignore warnings in ansible-test environment check. 2020-01-13 16:16:55 -08:00
virtualenvcheck.py Clean up code in ansible-test. (#73379) 2021-01-26 14:02:08 -08:00
yamlcheck.py