Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added test about error filterwarnings

Refs #20083.
  • Loading branch information...
commit 8446a2438ffeab845e31cba4489f03fccc387298 1 parent 0c6a339
@claudep claudep authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/logging_tests/tests.py
View
10 tests/logging_tests/tests.py
@@ -128,6 +128,16 @@ def test_warnings_capture_debug_false(self):
output = force_text(self.outputs[0].getvalue())
self.assertFalse('Foo Deprecated' in output)
+ @override_settings(DEBUG=True)
+ def test_error_filter_still_raises(self):
+ with warnings.catch_warnings():
+ warnings.filterwarnings(
+ 'error',
+ category=RemovedInNextVersionWarning
+ )
+ with self.assertRaises(RemovedInNextVersionWarning):
+ warnings.warn('Foo Deprecated', RemovedInNextVersionWarning)
+
class CallbackFilterTest(TestCase):
def test_sense(self):
Please sign in to comment.
Something went wrong with that request. Please try again.