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
snipfoo 5f4e332e37
Fix condition for unquoting configuration strings from ini files (#82388)
* Add prefix to `origin` when configuration variables come from ini files

Fixes ansible#82387

This change was suggested by @bcoca in
https://github.com/ansible/ansible/pull/82388#discussion_r1424235728 and
https://github.com/ansible/ansible/pull/82388#discussion_r1424249732

When configuration variables come from an ini file, their `origin` is
now set to `ini: <file>`. Similarly, once supported, YAML configuration
files will have their `origin` as `yaml: <file>`.

Consequently, since unquoting configuration strings should happen if and
only if they come from an ini file, this condition boils down to testing
whether their `origin` starts with `ini:`.

* Do not add prefix to `origin` but explicitly pass `origin_ftype`

So as not to rely on a specific format of the `origin` string,
as suggested by @sivel in
https://github.com/ansible/ansible/pull/82388#issuecomment-1881714871
2 years ago
..
_vendor Require `from __future__ import annotations` (#81902) 2 years ago
ansible_test Remove unused validate-modules unit test code 2 years ago
cli Use of constant for 644 permission variable (#82762) 2 years ago
config Fix condition for unquoting configuration strings from ini files (#82388) 2 years ago
errors Remove Python 2.x compat from unit tests (#82109) 2 years ago
executor Updates to interpreter discovery for 2.17 (#82420) 2 years ago
galaxy Use of constant for 644 permission variable (#82762) 2 years ago
inventory Remove Python 2 compat (via six) from unit tests 2 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 11 years ago
mock Enable file cache for vaulted host_vars_files vars plugin (#81995) 2 years ago
module_utils atomic_move - fix preserving extended acls (#82818) 2 years ago
modules test_apt: migrate from unittest to pytest (#82666) 2 years ago
parsing Enable file cache for vaulted host_vars_files vars plugin (#81995) 2 years ago
playbook pylint: update for use-yield-from 2 years ago
plugins Remove deprecated scp_if_ssh from SSH connection plugin (#82072) 2 years ago
regex Remove Python 2.x compat from unit tests (#82109) 2 years ago
template Remove Python 2.x compat from unit tests (#82109) 2 years ago
utils remove repetitive words (#82799) 2 years ago
vars Remove Python 2 compat (via six) from unit tests 2 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
requirements.txt Remove Python 3.9 support for the controller (#80973) 2 years 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