Matt Clay
f4a80bb600
Code cleanup and refactoring in ansible-test. ( #67063 )
...
* Code cleanup in ansible-test.
* Split out encoding functions.
* Consoldate loading of JSON files.
* Split out disk IO functions.
* Simplify file access.
* Add functions for opening files.
* Replace open calls with appropriate functions.
* Expose more types from typing module.
* Support writing compact JSON.
* Add verbosity argument to display.warning.
* Add changelog entry.
* Update files overlooked during rebase.
* Use `io.open` instead of `open`.
* Fix file opening for imp.load_module.
* Remove use of `r+` mode to access files.
* Add missing import.
* Fix httptester on Python 2.x.
* Clarify changelog fragment.
* Consolidate imports. Remove extra newlines.
* Fix indirect imports.
2020-02-04 11:21:53 -08:00
Matt Clay
064e8e1ef4
Fix ansible-doc traceback and sanity test. ( #62040 )
...
* Fix ansible-doc traceback for removed modules.
This avoids tracebacks with errors like the following when a module has been removed:
module module_name missing documentation (or could not parse documentation): 'NoneType' object does not support item assignment
* Fix ansible-doc sanity test warning handling.
Warnings about removed modules/plugins on stderr are now properly ignored.
Previously an ansible-doc error could result in unrelated errors going undetected because tests were stopped early and the underlying error was ignored.
2019-09-10 00:29:34 -07:00
Matt Clay
e258ba703e
Improve ansible-test env display. ( #61339 )
...
* Improve ansible-test env display.
* Fix PyCharm warnings.
* Fix ansible-test ansible-doc sanity test with -e.
2019-08-26 14:02:55 -07:00
Matt Clay
d651bda123
Relocate ansible-test code. ( #60147 )
...
* Initial move of `test/runner/` content.
`test/runner/lib/` -> `test/lib/ansible_test/_internal/`
`test/runner/` -> `test/lib/ansible_test/_internal/data/`
* Initial move of `test/sanity/` content.
`test/sanity/` -> `test/lib/ansible_test/_internal/data/sanity/` (except `test/sanity/ignore.txt`)
* Initial move of `test/units/pytest/` content.
`test/units/pytest/` -> `test/lib/ansible_test/_internal/data/pytest/`
* Follow-up move of `test/runner/unit/` content.
`test/lib/ansible_test/_internal/data/unit/` -> `test/lib/ansible_test/tests/unit/`
* Initial move of `ansible.cfg` content.
`test/units/ansible.cfg` -> `test/lib/ansible_test/_internal/data/units/ansible.cfg`
`test/env/ansible.cfg` -> `test/lib/ansible_test/_internal/data/env/ansible.cfg`
* Follow-up move of `data` directory.
`test/lib/ansible_test/_internal/data/` -> `test/lib/ansible_test/_data/`
* Update import statements.
* Add missing __init__.py for unit tests.
* Fix path references and miscellaneous issues.
2019-08-06 14:43:29 -07:00