예제 #1
0
 def test_invalid_data(self):
     """make_word_list should return [] on invalid data."""
     self.assertEqual([], make_word_list(STR["PUNCTUATION"]))
     self.assertEqual([], make_word_list(STR["INVALID"]))
예제 #2
0
 def test_valid_data(self):
     """make_word_list should return list with all lowercase 
     and stripped whitespace."""
     for inp, out in STR["VALID"]:
         self.assertEqual(out, make_word_list(inp))
예제 #3
0
 def test_empty_data(self):
     """make_word_list should return [] on input ''."""
     self.assertEqual([], make_word_list(""))