Exemplo n.º 1
0
 def test_char_freq_empty(self):
     self.assertEqual(etao.char_frequency(''), {})
Exemplo n.º 2
0
 def test_char_freq_only_alpha(self):
     self.assertEqual(
         etao.char_frequency('a..a!a?   b', only_alpha=True),
         {'a': 0.75, 'b': 0.25}
     )
Exemplo n.º 3
0
 def test_char_freq_ab(self):
     self.assertEqual(
         etao.char_frequency('aaab'),
         {'a': 0.75, 'b': 0.25}
     )
Exemplo n.º 4
0
 def test_char_freq_ab(self):
     self.assertEqual(etao.char_frequency('aaab'), {'a': 0.75, 'b': 0.25})
Exemplo n.º 5
0
 def test_char_freq_empty(self):
     self.assertEqual(etao.char_frequency(''), {})
Exemplo n.º 6
0
 def test_char_freq_only_alpha(self):
     self.assertEqual(etao.char_frequency('a..a!a?   b', only_alpha=True), {
         'a': 0.75,
         'b': 0.25
     })