diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-05-03 21:23:50 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-05-03 21:31:23 +0200 |
| commit | 11a5355517487eab56c34d92b45d7d67fde6dbd3 (patch) | |
| tree | ea5039d653b171c324b0fc705c2a600efb106198 /tests/regressiontests | |
| parent | 00c0d3c44ebc4e3461653ec96cd47023cc0a6e5b (diff) | |
Inserted more simplefilter calls to be sure warnings are emitted.
Thanks to Florian Apolloner for suggesting the patch.
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/logging_tests/tests.py | 1 | ||||
| -rw-r--r-- | tests/regressiontests/requests/tests.py | 1 | ||||
| -rw-r--r-- | tests/regressiontests/utils/text.py | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/logging_tests/tests.py b/tests/regressiontests/logging_tests/tests.py index e4c045b9d8..887897a16f 100644 --- a/tests/regressiontests/logging_tests/tests.py +++ b/tests/regressiontests/logging_tests/tests.py @@ -43,6 +43,7 @@ class PatchLoggingConfigTest(TestCase): config = copy.deepcopy(OLD_LOGGING) with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") compat_patch_logging_config(config) self.assertEqual(len(w), 1) diff --git a/tests/regressiontests/requests/tests.py b/tests/regressiontests/requests/tests.py index cf4c58b1f9..5c49afbc35 100644 --- a/tests/regressiontests/requests/tests.py +++ b/tests/regressiontests/requests/tests.py @@ -415,6 +415,7 @@ class RequestsTests(unittest.TestCase): 'wsgi.input': ExplodingStringIO(payload)}) with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") with self.assertRaises(UnreadablePostError): request.raw_post_data self.assertEqual(len(w), 1) diff --git a/tests/regressiontests/utils/text.py b/tests/regressiontests/utils/text.py index e749ccfbe6..ad65ec89ee 100644 --- a/tests/regressiontests/utils/text.py +++ b/tests/regressiontests/utils/text.py @@ -73,6 +73,7 @@ class TestUtilsText(SimpleTestCase): def test_old_truncate_words(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") self.assertEqual(u'The quick brown fox jumped over the lazy dog.', text.truncate_words(u'The quick brown fox jumped over the lazy dog.', 10)) self.assertEqual(u'The quick brown fox ...', @@ -83,6 +84,7 @@ class TestUtilsText(SimpleTestCase): def test_old_truncate_html_words(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") self.assertEqual(u'<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', text.truncate_html_words('<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', 10)) self.assertEqual(u'<p><strong><em>The quick brown fox ...</em></strong></p>', |
