Commit f7845449 authored by Markus Amalthea Magnuson's avatar Markus Amalthea Magnuson Committed by Claude Paroz
Browse files

Moved wordwrap test to their own function

The `wordwrap` tests were in the `test_wordcount()` method for some
reason. This moves them to their own method, and make consistent use of
double quotes where needed.
parent acb20016
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -370,16 +370,15 @@ class DefaultFiltersTests(TestCase):
        self.assertEqual(wordcount('oneword'), 1)
        self.assertEqual(wordcount('lots of words'), 3)

    def test_wordwrap(self):
        self.assertEqual(wordwrap('this is a long paragraph of text that '
            'really needs to be wrapped I\'m afraid', 14),
            "this is a long\nparagraph of\ntext that\nreally needs\nto be "
            "really needs to be wrapped I'm afraid", 14),
            'this is a long\nparagraph of\ntext that\nreally needs\nto be '
            "wrapped\nI'm afraid")

        self.assertEqual(wordwrap('this is a short paragraph of text.\n  '
            'But this line should be indented', 14),
            'this is a\nshort\nparagraph of\ntext.\n  But this\nline '
            'should be\nindented')

        self.assertEqual(wordwrap('this is a short paragraph of text.\n  '
            'But this line should be indented', 15), 'this is a short\n'
            'paragraph of\ntext.\n  But this line\nshould be\nindented')