Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#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)

17049-1.diff (20.4 KB ) - added by Claude Paroz 12 years ago.
Use catch_warnings more extensively

Download all attachments as: .zip

Change History (6)

comment:1 by Alex Gaynor, 13 years ago

Component: UncategorizedTesting framework
Triage Stage: UnreviewedAccepted
Version: 1.3SVN

comment:2 by Claude Paroz, 12 years ago

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

by Claude Paroz, 12 years ago

Attachment: 17049-1.diff added

Use catch_warnings more extensively

comment:3 by Claude Paroz, 12 years ago

Resolution: fixed
Status: newclosed

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 Claude Paroz, 12 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.

comment:5 by Anssi Kääriäinen, 12 years ago

FWIW all tests pass on Oracle 11g with no warnings.

Note: See TracTickets for help on using tickets.
Back to Top