mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #23923 -- Promoted Django's deprecation warnings to errors in runtests.py
This commit is contained in:
parent
860eb01d17
commit
3131e9cef5
11 changed files with 46 additions and 21 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue