You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units
Martin Krizek 600c1e67b4
Exceptions clean up (#85176)
* replace usage of `IOError` as it is an alias to `OSError`
* replace usage of `socket.error` as it is an alias to `OSError`
* use subclasses of `OSError` rather than inspecting `errno`s
* utilize `exist_ok` parameter of `os.makedirs` rather than ignoring
  `FileExistsError`

Make the following changes to the exception handling this patch already
updates to be consistent with the new code:
* use `ex` as a name for exception being handled
* use `from ex` when re-raising exception for additional context
* use f-strings and `!r` for quoting
* pass exceptions to the `exception` parameter of `fail_json`
* use `display.error_as_warning` rather than passing stringified
  exception into `display.warning`

Co-authored-by: Matt Clay <matt@mystile.com>
8 months ago
..
_internal Restore 2.18 vault tag YAML dump behavior (#85275) 8 months ago
_vendor Require `from __future__ import annotations` (#81902) 2 years ago
ansible_test ansible-test - Fix option filtering (#85182) 8 months ago
cli Templating overhaul, implement Data Tagging (#84621) 10 months ago
config fix ensure_type to support vaulted values (#85129) 9 months ago
errors Clean up TE error handling, wrap sigalrm handler (#85232) 8 months ago
executor adjust PluginInfo to use PluginType enum (#85277) 8 months ago
galaxy Templating overhaul, implement Data Tagging (#84621) 10 months ago
inventory Templating overhaul, implement Data Tagging (#84621) 10 months ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 11 years ago
mock Clean up TE error handling, wrap sigalrm handler (#85232) 8 months ago
module_utils Exceptions clean up (#85176) 8 months ago
modules Templating overhaul, implement Data Tagging (#84621) 10 months ago
parsing adjust PluginInfo to use PluginType enum (#85277) 8 months ago
playbook Implement TaskResult backward compatibility for callbacks (#85039) 9 months ago
plugins Fix YAML loading/dumping and filters (#85266) 8 months ago
regex Remove Python 2.x compat from unit tests (#82109) 2 years ago
template Prevent template lookup and action from masking `ansible_managed` value (#85075) 8 months ago
test_utils DTFIX recategorization and error/warning refactor (#85181) 8 months ago
utils adjust PluginInfo to use PluginType enum (#85277) 8 months ago
vars Templating overhaul, implement Data Tagging (#84621) 10 months ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
conftest.py Add missing warning methods and args (#85225) 8 months ago
controller_only_conftest.py recategorize pass over DTFIX-MERGE entries post b4 (#85155) 9 months ago
requirements.txt Add typing_extensions for core unit tests on <3.11 (#84865) 10 months ago
test_context.py Require `from __future__ import annotations` (#81902) 2 years ago
test_no_tty.py Require `from __future__ import annotations` (#81902) 2 years ago