﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14508	Test suite silences warnings	Luke Plant	nobody	"The documentation encourages use of `python -Wall manage.py test` to find `PendingDeprecationWarning`.  However, Django's test suite in many places silences warnings (e.g. `DeprecationWarning`), and then 'restores' the state of warning filters to something other than what it was originally.  So, for example, if you do:

{{{
python -Wall manage.py test auth myapp
}}}

the warnings from `myapp` will not be shown as they ought.

Also, many warnings that Django's test suite itself emits are silenced by the current way of handling warnings - such as all the `PendingDeprecationWarning`s emitted by `unittest2.failUnless` etc., and some from cgi, depending on which tests are run and in what order.

Two things need to be done:

 1. Correctly save and restore the original filters. `warnings.catch_warnings` from Python 2.5 and greater shows how to do this.
 2. Use more specific filters so that only warnings generated by Django are silenced, not those generated by unittest2. This is slightly tricky, since we are bundling unittest2 in the Django namespace.


"		closed	Testing framework	1.2		fixed			Unreviewed	0	0	0	0	0	0
