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'))
 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'))
 def test_words_to_num_mixed(self):
     self.assertEquals(324, words_to_num('<324~.+>'))
 def test_words_to_num_marked_up(self):
     self.assertEquals(4, words_to_num('NUM_START<four~CD>NUM_END'))
Esempio n. 10
0
 def test_words_to_num_and(self):
     self.assertEquals(
         7320, words_to_num('seven thousand, three hundred and twenty'))
Esempio n. 11
0
 def test_words_to_num_mixed(self):
     self.assertEquals(1806, words_to_num('18 hundred and six'))
Esempio n. 12
0
 def test_words_to_num_and(self):
     self.assertEquals(326, words_to_num('three hundred and twenty six'))
Esempio n. 13
0
 def test_words_to_num_the(self):
     self.assertEquals(6, words_to_num('the six'))
Esempio 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'))
Esempio 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'))
Esempio 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~.+>'))
Esempio 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'))
Esempio n. 24
0
 def test_words_to_num_simple(self):
     self.assertEquals(8, words_to_num("eight"))