Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add more warnings.simplefilter calls.

This is a follow up to 00c0d3c
which still caused 4 test failures on my machine.
  • Loading branch information...
commit 90b70099c8aa32f69a0632bca8edadfbca307b60 1 parent 00c0d3c
Florian Apolloner apollo13 authored
1  tests/regressiontests/logging_tests/tests.py
View
@@ -43,6 +43,7 @@ def test_filter_added(self):
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)
1  tests/regressiontests/requests/tests.py
View
@@ -415,6 +415,7 @@ def read(self, len=0):
'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)
2  tests/regressiontests/utils/text.py
View
@@ -73,6 +73,7 @@ def test_truncate_html_words(self):
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 @@ def test_old_truncate_words(self):
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>',
Please sign in to comment.
Something went wrong with that request. Please try again.