summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-04-02 13:26:39 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-04-02 13:26:39 +0000
commit32517041bd051389c349d14ccdbf882d095acf8f (patch)
tree2e1d4c1d4e666080020424b811573eb9b894433f
parent4749159d48c42c706cd14ab105179f29deab734d (diff)
Silenced DeprecationWarning caused by testing deprecated DjangoTestRunner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/test_runner/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/regressiontests/test_runner/tests.py b/tests/regressiontests/test_runner/tests.py
index dfdd57498c..b3d6475697 100644
--- a/tests/regressiontests/test_runner/tests.py
+++ b/tests/regressiontests/test_runner/tests.py
@@ -2,12 +2,22 @@
Tests for django test runner
"""
import StringIO
+import warnings
from django.core.exceptions import ImproperlyConfigured
from django.test import simple
+from django.test.utils import get_warnings_state, restore_warnings_state
from django.utils import unittest
+
class DjangoTestRunnerTests(unittest.TestCase):
+ def setUp(self):
+ self._warnings_state = get_warnings_state()
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ module='django.test.simple')
+
+ def tearDown(self):
+ restore_warnings_state(self._warnings_state)
def test_failfast(self):
class MockTestOne(unittest.TestCase):