1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.5.x] 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.

Backport of e79b857a07 from master.
This commit is contained in:
Preston Holmes
2013-03-24 21:34:46 -07:00
committed by Jacob Kaplan-Moss
parent 456d6c15db
commit 572a300e56
6 changed files with 40 additions and 22 deletions

View File

@@ -2,6 +2,8 @@ import warnings
from django.test import TestCase
warnings.warn("module-level warning from deprecation_app", DeprecationWarning)
class DummyTest(TestCase):
def test_warn(self):
warnings.warn("warning from test", DeprecationWarning)