def test_words_to_num_the(self):
     self.assertEquals(6, words_to_num('the six'))
 def test_words_to_num_none(self):
     self.assertEquals(0, words_to_num(None))
 def test_words_to_num_a(self):
     self.assertEquals(100, words_to_num('a hundred'))
 def test_words_to_num_ordinal(self):
     self.assertEquals(92, words_to_num('ninety second'))
Exemplo n.º 5
0
 def test_words_to_num_none(self):
     self.assertEquals(0, words_to_num(None))
 def test_words_to_num_mixed(self):
     self.assertEquals(1806, words_to_num('18 hundred and six'))
 def test_words_to_num_marked_up(self):
     self.assertEquals(4, words_to_num('NUM_START<four~CD>NUM_END'))
Exemplo n.º 8
0
 def test_words_to_num_mixed(self):
     self.assertEquals(324, words_to_num('<324~.+>'))
Exemplo n.º 9
0
 def test_words_to_num_marked_up(self):
     self.assertEquals(4, words_to_num('NUM_START<four~CD>NUM_END'))
Exemplo n.º 10
0
 def test_words_to_num_and(self):
     self.assertEquals(
         7320, words_to_num('seven thousand, three hundred and twenty'))
Exemplo n.º 11
0
 def test_words_to_num_mixed(self):
     self.assertEquals(1806, words_to_num('18 hundred and six'))
Exemplo n.º 12
0
 def test_words_to_num_and(self):
     self.assertEquals(326, words_to_num('three hundred and twenty six'))
Exemplo n.º 13
0
 def test_words_to_num_the(self):
     self.assertEquals(6, words_to_num('the six'))
Exemplo n.º 14
0
 def test_words_to_num_a(self):
     self.assertEquals(100, words_to_num('a hundred'))
 def test_words_to_num_and(self):
     self.assertEquals(326, words_to_num('three hundred and twenty six'))
Exemplo n.º 16
0
 def test_words_to_num_mixed(self):
     self.assertEquals(0, words_to_num('six hundred and bread'))
 def test_words_to_num_and(self):
     self.assertEquals(7320, words_to_num('seven thousand, three hundred and twenty'))
Exemplo n.º 18
0
 def test_words_to_num_ordinal(self):
     self.assertEquals(92, words_to_num('ninety second'))
 def test_words_to_num_mixed(self):
     self.assertEquals(324, words_to_num('<324~.+>'))
Exemplo n.º 20
0
 def test_words_to_num_bad_ordinal(self):
     self.assertEquals(0, words_to_num('first two'))
 def test_words_to_num_mixed(self):
     self.assertEquals(0, words_to_num('six hundred and bread'))
 def test_words_to_num_simple(self):
     self.assertEquals(8, words_to_num("eight"))
 def test_words_to_num_bad_ordinal(self):
     self.assertEquals(0, words_to_num('first two'))
Exemplo n.º 24
0
 def test_words_to_num_simple(self):
     self.assertEquals(8, words_to_num("eight"))