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 Prepare ansible-test for inclusion in setup.py (#60294) 2019-08-08 16:14:19 -07:00
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 Update ansible-test integration config handling. (#60448) 2019-08-13 13:18:55 -07:00
collection_detail.py Add deprecated removed_in_version and deprecated_aliases version tests (#66920) 2020-05-13 13:58:09 -07:00
coveragerc Move ansible-test coverage config to test/lib/ 2019-08-07 18:32:46 -07:00
cryptography-constraints.txt Fix cryptography constraints in ansible-test. (#72914) 2020-12-09 10:46:05 -08:00
inventory Update ansible-test collection inventory handling. (#61031) 2019-08-21 12:12:37 -07:00
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