summaryrefslogtreecommitdiff
path: root/tests/regressiontests/utils
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-05-03 20:18:05 +0200
committerClaude Paroz <claude@2xlibre.net>2012-05-03 20:18:05 +0200
commit00c0d3c44ebc4e3461653ec96cd47023cc0a6e5b (patch)
tree050b07dde4949a585f59572eaa1d79d4c3427064 /tests/regressiontests/utils
parent10cf3c64273db407402ea9723569dfc8d059e186 (diff)
Made warning assertions work with or without -Wall python switch
Diffstat (limited to 'tests/regressiontests/utils')
-rw-r--r--tests/regressiontests/utils/text.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/utils/text.py b/tests/regressiontests/utils/text.py
index 6457845c6f..e749ccfbe6 100644
--- a/tests/regressiontests/utils/text.py
+++ b/tests/regressiontests/utils/text.py
@@ -79,7 +79,7 @@ class TestUtilsText(SimpleTestCase):
text.truncate_words('The quick brown fox jumped over the lazy dog.', 4))
self.assertEqual(u'The quick brown fox ....',
text.truncate_words('The quick brown fox jumped over the lazy dog.', 4, '....'))
- self.assertEqual(len(w), 3)
+ self.assertGreater(len(w), 0)
def test_old_truncate_html_words(self):
with warnings.catch_warnings(record=True) as w:
@@ -91,7 +91,7 @@ class TestUtilsText(SimpleTestCase):
text.truncate_html_words('<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', 4, '....'))
self.assertEqual(u'<p><strong><em>The quick brown fox</em></strong></p>',
text.truncate_html_words('<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', 4, None))
- self.assertEqual(len(w), 4)
+ self.assertGreater(len(w), 0)
def test_wrap(self):
digits = '1234 67 9'