Opened 7 years ago

Closed 6 years ago

Last modified 6 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: master
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


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 6 years ago.
Use catch_warnings more extensively

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by Alex Gaynor

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

comment:2 Changed 6 years ago by Claude Paroz

After commit b52672d77822e88752cb178c8a359adde83ff0ba, the test suite with python2.6 + SQLite and PostgreSQL seems to be warnings-free. Needs confirmation for other combinations.

Changed 6 years ago by Claude Paroz

Attachment: 17049-1.diff added

Use catch_warnings more extensively

comment:3 Changed 6 years ago by Claude Paroz

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 Changed 6 years ago by Claude Paroz

Oh, and forgot to mention that Aymeric has added -Wall to test suites, so we can check in console output for uncatched warnings.

comment:5 Changed 6 years ago by Anssi Kääriäinen

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

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