From 00c0d3c44ebc4e3461653ec96cd47023cc0a6e5b Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 3 May 2012 20:18:05 +0200 Subject: Made warning assertions work with or without -Wall python switch --- tests/regressiontests/utils/text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/regressiontests/utils') 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('

The quick brown fox jumped over the lazy dog.

', 4, '....')) self.assertEqual(u'

The quick brown fox

', text.truncate_html_words('

The quick brown fox jumped over the lazy dog.

', 4, None)) - self.assertEqual(len(w), 4) + self.assertGreater(len(w), 0) def test_wrap(self): digits = '1234 67 9' -- cgit v1.3