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.
This commit is contained in:
parent
acb20016c0
commit
f7845449b4
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue