mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
[1.5.x] Fixed #18985 -- ensure module level deprecations are displayed
Also don't compete with -W CLI option.
Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
Backport of e79b857a07
from master.
This commit is contained in:
parent
456d6c15db
commit
572a300e56
6 changed files with 40 additions and 22 deletions
|
@ -298,7 +298,8 @@ class DeprecationDisplayTest(AdminScriptTestCase):
|
|||
def test_runner_deprecation_verbosity_default(self):
|
||||
args = ['test', '--settings=regressiontests.settings']
|
||||
out, err = self.run_django_admin(args)
|
||||
self.assertTrue("DeprecationWarning: warning from test" in err)
|
||||
self.assertIn("DeprecationWarning: warning from test", err)
|
||||
self.assertIn("DeprecationWarning: module-level warning from deprecation_app", err)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (2, 6),
|
||||
"On Python 2.6, DeprecationWarnings are visible anyway")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue