1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +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

@@ -1,4 +1,5 @@
#!/usr/bin/env python
import logging
import os
import shutil
import subprocess
@@ -82,6 +83,14 @@ def setup(verbosity, test_labels):
settings.LANGUAGE_CODE = 'en'
settings.SITE_ID = 1
if verbosity > 0:
# Ensure any warnings captured to logging are piped through a verbose
# logging handler. If any -W options were passed explicitly on command
# line, warnings are not captured, and this has no effect.
logger = logging.getLogger('py.warnings')
handler = logging.StreamHandler()
logger.addHandler(handler)
# Load all the ALWAYS_INSTALLED_APPS.
get_apps()