mirror of
https://github.com/django/django.git
synced 2025-11-20 03:30:00 +00:00
Advanced deprecation warnings for Django 2.2.
This commit is contained in:
parent
74a313942c
commit
b9dd8512f2
3 changed files with 17 additions and 3 deletions
|
|
@ -17,7 +17,9 @@ from django.test import TestCase, TransactionTestCase
|
|||
from django.test.runner import default_test_processes
|
||||
from django.test.selenium import SeleniumTestCaseBase
|
||||
from django.test.utils import get_runner
|
||||
from django.utils.deprecation import RemovedInDjango30Warning
|
||||
from django.utils.deprecation import (
|
||||
RemovedInDjango30Warning, RemovedInDjango31Warning,
|
||||
)
|
||||
from django.utils.log import DEFAULT_LOGGING
|
||||
|
||||
try:
|
||||
|
|
@ -30,6 +32,7 @@ else:
|
|||
|
||||
# Make deprecation warnings errors to ensure no usage of deprecated features.
|
||||
warnings.simplefilter("error", RemovedInDjango30Warning)
|
||||
warnings.simplefilter('error', RemovedInDjango31Warning)
|
||||
# Make runtime warning errors to ensure no usage of error prone patterns.
|
||||
warnings.simplefilter("error", RuntimeWarning)
|
||||
# Ignore known warnings in test dependencies.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue