1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

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.
This commit is contained in:
Preston Holmes
2013-03-24 21:34:46 -07:00
parent 9c4882b391
commit e79b857a07
6 changed files with 40 additions and 22 deletions

View File

@@ -299,7 +299,8 @@ class DeprecationDisplayTest(AdminScriptTestCase):
def test_runner_deprecation_verbosity_default(self):
args = ['test', '--settings=test_project.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")