[1.8.x] Clarified assertRaisesMessage() behavior with respect to the message.
Backport of 6bb4f07372fe748a701ad38e5c0d1182dab9e2c8 from master
This commit is contained in:
parent
386a6dc3d7
commit
f5f03e3de9
@ -1337,7 +1337,7 @@ your test suite.
|
|||||||
SimpleTestCase.assertRaisesMessage(expected_exception, expected_message)
|
SimpleTestCase.assertRaisesMessage(expected_exception, expected_message)
|
||||||
|
|
||||||
Asserts that execution of ``callable`` raises ``expected_exception`` and
|
Asserts that execution of ``callable`` raises ``expected_exception`` and
|
||||||
that the exception has an ``expected_message`` representation. Any other
|
that ``expected_message`` is found in the exception's message. Any other
|
||||||
outcome is reported as a failure. Similar to unittest's
|
outcome is reported as a failure. Similar to unittest's
|
||||||
:meth:`~unittest.TestCase.assertRaisesRegex` with the difference that
|
:meth:`~unittest.TestCase.assertRaisesRegex` with the difference that
|
||||||
``expected_message`` isn't a regular expression.
|
``expected_message`` isn't a regular expression.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user