Opened 12 years ago
Closed 12 years ago
#19589 closed Cleanup/optimization (fixed)
assertRegexpMatches is deprecated on Python 3
Reported by: | Claude Paroz | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We have currently three occurrences of assertRegexpMatches
in Django testing code, and those raise a DeprecationWarning
on Python 3.
We can:
- add a compatibility function in
six
, like we did forassertRaisesRegexp/assertRaisesRegex
- it has been suggested on IRC to add those aliases on
SimpleTestCase
instead, probably a little cleaner, but then the warning will be shown when those methods are used on a bareunittest.TestCase
.
Change History (3)
comment:1 by , 12 years ago
Triage Stage: | Design decision needed → Accepted |
---|
comment:2 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
I'd add that to our six customizations and document it.