9 lines
536 B
ReStructuredText
9 lines
536 B
ReStructuredText
Passing the ``message`` parameter of ``pytest.raises`` now issues a ``DeprecationWarning``.
|
|
|
|
It is a common mistake to think this parameter will match the exception message, while in fact
|
|
it only serves to provide a custom message in case the ``pytest.raises`` check fails. To avoid this
|
|
mistake and because it is believed to be little used, pytest is deprecating it without providing
|
|
an alternative for the moment.
|
|
|
|
If you have concerns about this, please comment on `issue #3974 <https://github.com/pytest-dev/pytest/issues/3974>`__.
|