ansible/test/units
Toshio Kuratomi e08427a138 Correct places where match was intended
pytest.raises has two parameters, message and match.  message is meant
to be the error message that pytest gives when the tested code does not
raise the expected exception.  match is the string that pytest expects
to be a match for the repr of the exception.  Unfortunately, it seems
that message is often mistakenly used where match is meant.  Fix those
cases.

message is also deprecated so removed our usage of it.  Perhaps we
should write a sanity test later that prevents the use of
pytest.raises(message) to avoid this mistake.

seealso: https://docs.pytest.org/en/4.6-maintenance/deprecations.html#message-parameter-of-pytest-raises

Also update the exception message tested for as we're now properly
detecting that the messages have changed.

(cherry picked from commit 87601969a3)

Fix root filter test

On python-2.6 the error message is different

(cherry picked from commit 67fb3a8215)

Fix the pytest match test for python-2.6

(cherry picked from commit 8a880d6032)
2019-07-29 12:08:15 -07:00
..
cli
compat
config
contrib
errors
executor
inventory_test_data/group_vars
mock
module_utils [stable-2.8] Handle situation where ansible_architecure may not be defined when gathering facts (#55466) 2019-07-22 16:22:04 -07:00
modules Correct places where match was intended 2019-07-29 12:08:15 -07:00
parsing Correct places where match was intended 2019-07-29 12:08:15 -07:00
playbook
plugins Correct places where match was intended 2019-07-29 12:08:15 -07:00
regex
template
utils [stable-2.8] Skip tests with unsatisfied deps (#55853) 2019-06-29 11:31:58 -07:00
vars
__init__.py
ansible.cfg
conftest.py
test_constants.py
test_context.py