Avoided changing raw DeprecationWarning filter behavior

Refs #21188. Now pure Python DeprecationWarning visibility should
be back to Python defaults.
This commit is contained in:
Claude Paroz 2014-03-08 11:13:45 +01:00
parent 210d0489c5
commit 0c6a339952
5 changed files with 19 additions and 11 deletions

View file

@ -13,6 +13,7 @@ from django import db
from django.test import runner, TestCase, TransactionTestCase, skipUnlessDBFeature
from django.test.testcases import connections_support_transactions
from django.test.utils import IgnoreAllDeprecationWarningsMixin, override_system_checks
from django.utils import six
from admin_scripts.tests import AdminScriptTestCase
from .models import Person
@ -368,14 +369,14 @@ class DeprecationDisplayTest(AdminScriptTestCase):
args = ['test', '--settings=test_project.settings', 'test_runner_deprecation_app']
out, err = self.run_django_admin(args)
self.assertIn("Ran 1 test", err)
self.assertIn("DeprecationWarning: warning from test", err)
self.assertIn("DeprecationWarning: module-level warning from deprecation_app", err)
six.assertRegex(self, err, r"RemovedInDjango\d\dWarning: warning from test")
six.assertRegex(self, err, r"RemovedInDjango\d\dWarning: module-level warning from deprecation_app")
def test_runner_deprecation_verbosity_zero(self):
args = ['test', '--settings=test_project.settings', '--verbosity=0', 'test_runner_deprecation_app']
out, err = self.run_django_admin(args)
self.assertIn("Ran 1 test", err)
self.assertFalse("DeprecationWarning: warning from test" in err)
self.assertFalse("warning from test" in err)
class AutoIncrementResetTest(TransactionTestCase):