#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
-------------------------------------+-------------------------------------
Changes (by timgraham):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
It was added in #14503. Documentation says, "Similar to unittest’s
assertRaisesRegex() with the difference that expected_message isn’t a
regular expression." I guess with `assertRaisesRegex` you will have to
call `re.escape(expected_message)` to ensure the message isn't treated as
a regular expression. Should that point be noted? Another advantage from
my perspective is that `assertRaisesMessage` won't need to change when
dropping Python 2, unlike `six.assertRaisesRegex` (`six` -> `self` and
removing `self` argument).
--
Ticket URL: <https://code.djangoproject.com/ticket/25948#comment:1>
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.c3af41cc562f0800d767ab5c1c53eba3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.