added another test

This commit is contained in:
Andreas Preikschat 2014-03-31 17:31:05 +02:00
parent 9dd5f30254
commit 3260de7b7c
1 changed files with 15 additions and 0 deletions

View File

@ -104,3 +104,18 @@ class TestRenderer(TestCase):
# THEN: Check if the correct tuple is returned.
self.assertEqual(result, expected_tuple), 'A tuple should be returned '
'(fixed-text, opening tags, html opening tags).'
def _word_split_test(self):
"""
Test the _word_split() method
"""
# GIVEN: A line of text
renderer = Renderer()
given_line = 'beginning asdf \n end asdf'
expected_words = ['beginning', 'asdf', 'end', 'asdf']
# WHEN: Split the line
result_words = renderer._words_split(given_line)
# THEN: The word lists should be the same.
self.assertListEqual(result_words, expected_words)