#17049 closed Cleanup/optimization (fixed)
The test suite should be deprecation-warning clean
Reported by: | Carl Meyer | Owned by: | nobody |
---|---|---|---|
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
Right now running the test suite with -Wall results in quite a few warnings. Really, when we deprecate something, we should modify its tests to use the catch_warnings context manager and test for the deprecation warning, as well as preventing it from bubbling up to the test suite.
Unfortunately catch_warnings is Python 2.6+. Since this probably isn't important enough to warrant a backport, just leaving this ticket as a reminder to clean this up once we hit 2.6 as minimum supported Python version.
Attachments (1)
Change History (6)
comment:1 by , 13 years ago
Component: | Uncategorized → Testing framework |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | 1.3 → SVN |
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch committed in 10cf3c64273db407402ea9723569dfc8d059e186
I think the only remaining warnings/errors are related to gis tests, and there are exiting tickets for those: #17958 and #17959. So closing this one.
comment:4 by , 13 years ago
Oh, and forgot to mention that Aymeric has added -Wall to http://ci.djangoproject.com test suites, so we can check in console output for uncatched warnings.
After commit b52672d77822e88752cb178c8a359adde83ff0ba, the test suite with python2.6 + SQLite and PostgreSQL seems to be warnings-free. Needs confirmation for other combinations.
https://github.com/django/django/commit/b52672d77822e88752cb178c8a359adde83ff0ba