Example #1
0
 def testEmptyText(self):
     self.assertEqual({}, get_words_frequencies(''))
Example #2
0
 def testTextNoPunctuation(self):
     self.assertEqual({'to':2, 'be':2, 'or':1, 'not':1}, \
         get_words_frequencies('  to Be or Not TO be  '))
Example #3
0
 def testTextWithNoDuplicate(self):
     self.assertEqual({'to':1, 'be':1, 'just':1,}, \
         get_words_frequencies('just to be'))