#25948: documentation doesn't explain why assertRaisesMessage is needed
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by timgraham):
Is this explicit enough?
{{{ #!diff
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index c41e35d..4491878 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -1230,10 +1230,11 @@ your test suite.
.. method:: SimpleTestCase.assertRaisesMessage(expected_exception,
expected_message, callable_obj=None, *args, **kwargs)
Asserts that execution of callable ``callable_obj`` raised the
- ``expected_exception`` exception and that such exception has an
- ``expected_message`` representation. Any other outcome is reported as
a
- failure. Similar to unittest's
:meth:`~unittest.TestCase.assertRaisesRegex`
- with the difference that ``expected_message`` isn't a regular
expression.
+ ``expected_exception`` exception and that ``expected_message`` is in
the
+ exception's representation. Any other outcome is reported as a
failure.
+ It's a simpler version of :meth:`unittest.TestCase.assertRaisesRegex`
with
+ the difference that ``expected_message`` isn't treated as a regular
+ expression.
.. method:: SimpleTestCase.assertFieldOutput(fieldclass, valid, invalid,
field_args=None, field_kwargs=None, empty_value='')
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25948#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.cc0a1ab2742759e6ffcf67298f11106c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.