Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Silenced DeprecationWarning caused by testing deprecated DjangoTestRu…


git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 4749159 commit 32517041bd051389c349d14ccdbf882d095acf8f @freakboy3742 freakboy3742 committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/regressiontests/test_runner/
10 tests/regressiontests/test_runner/
@@ -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):

0 comments on commit 3251704

Please sign in to comment.
Something went wrong with that request. Please try again.