Fixed #23923 -- Promoted Django's deprecation warnings to errors in runtests.py

This commit is contained in:
Tim Graham 2014-11-26 16:21:29 -05:00
parent 860eb01d17
commit 3131e9cef5
11 changed files with 46 additions and 21 deletions

View file

@ -101,6 +101,7 @@ class WarningLoggerTests(TestCase):
# undocumented and (I assume) brittle.
self._old_capture_state = bool(getattr(logging, '_warnings_showwarning', False))
logging.captureWarnings(True)
warnings.filterwarnings('always')
# this convoluted setup is to avoid printing this deprecation to
# stderr during test running - as the test runner forces deprecations