#17640 closed Bug (fixed)
Exception message causes DeprecationWarning in test_utils
Reported by: | Zbigniew Siciarz | Owned by: | Zbigniew Siciarz |
---|---|---|---|
Component: | Testing framework | Version: | 1.4-alpha-1 |
Severity: | Normal | Keywords: | deprecation, tests |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
When running Django tests on Python 2.7 with -Wall, the tests in regressiontests/test_utils/tests.py raise a DeprecationWarning as follows:
C:\Users\USER\v\django14\django\tests\regressiontests\test_utils\tests.py:149: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
Attachments (2)
Change History (7)
by , 13 years ago
Attachment: | patch_17640.diff added |
---|
comment:1 by , 13 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 13 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Ready for checkin → Accepted |
I think it'd be best to convert these tests to use assertRaises as a context manager instead.
comment:5 by , 13 years ago
I've marked the regexps as raw strings for clarity (even though it isn't necessary, strictly speaking).
Note:
See TracTickets
for help on using tickets.
Got rid of DeprecationWarnings.