e08427a138
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 |
||
---|---|---|
.. | ||
action | ||
cache | ||
callback | ||
cliconf | ||
connection | ||
filter | ||
httpapi | ||
inventory | ||
loader_fixtures | ||
lookup | ||
shell | ||
strategy | ||
terminal | ||
vars | ||
__init__.py | ||
test_plugins.py |