Skip to content

Commit f69668b

Browse files
committed
Make deprecation warnings loud in the test suite
1 parent fa89b7d commit f69668b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
import os
33
import sys
4+
import warnings
45
import django
56

67
BASE_PATH = os.path.dirname(__file__)
@@ -12,6 +13,9 @@ def main():
1213
You can play with a django model without a complete django app installation.
1314
http://www.djangosnippets.org/snippets/1044/
1415
"""
16+
warnings.filterwarnings("always", category=DeprecationWarning)
17+
warnings.filterwarnings("always", category=PendingDeprecationWarning)
18+
1519
os.environ["DJANGO_SETTINGS_MODULE"] = "django.conf.global_settings"
1620
from django.conf import global_settings
1721

0 commit comments

Comments
 (0)