コード例 #1
0
 def test_words_to_num_the(self):
     self.assertEquals(6, words_to_num('the six'))
コード例 #2
0
 def test_words_to_num_none(self):
     self.assertEquals(0, words_to_num(None))
コード例 #3
0
 def test_words_to_num_a(self):
     self.assertEquals(100, words_to_num('a hundred'))
コード例 #4
0
 def test_words_to_num_ordinal(self):
     self.assertEquals(92, words_to_num('ninety second'))
コード例 #5
0
 def test_words_to_num_none(self):
     self.assertEquals(0, words_to_num(None))
コード例 #6
0
 def test_words_to_num_mixed(self):
     self.assertEquals(1806, words_to_num('18 hundred and six'))
コード例 #7
0
 def test_words_to_num_marked_up(self):
     self.assertEquals(4, words_to_num('NUM_START<four~CD>NUM_END'))
コード例 #8
0
 def test_words_to_num_mixed(self):
     self.assertEquals(324, words_to_num('<324~.+>'))
コード例 #9
0
 def test_words_to_num_marked_up(self):
     self.assertEquals(4, words_to_num('NUM_START<four~CD>NUM_END'))
コード例 #10
0
 def test_words_to_num_and(self):
     self.assertEquals(
         7320, words_to_num('seven thousand, three hundred and twenty'))
コード例 #11
0
 def test_words_to_num_mixed(self):
     self.assertEquals(1806, words_to_num('18 hundred and six'))
コード例 #12
0
 def test_words_to_num_and(self):
     self.assertEquals(326, words_to_num('three hundred and twenty six'))
コード例 #13
0
 def test_words_to_num_the(self):
     self.assertEquals(6, words_to_num('the six'))
コード例 #14
0
 def test_words_to_num_a(self):
     self.assertEquals(100, words_to_num('a hundred'))
コード例 #15
0
 def test_words_to_num_and(self):
     self.assertEquals(326, words_to_num('three hundred and twenty six'))
コード例 #16
0
 def test_words_to_num_mixed(self):
     self.assertEquals(0, words_to_num('six hundred and bread'))
コード例 #17
0
 def test_words_to_num_and(self):
     self.assertEquals(7320, words_to_num('seven thousand, three hundred and twenty'))
コード例 #18
0
 def test_words_to_num_ordinal(self):
     self.assertEquals(92, words_to_num('ninety second'))
コード例 #19
0
 def test_words_to_num_mixed(self):
     self.assertEquals(324, words_to_num('<324~.+>'))
コード例 #20
0
 def test_words_to_num_bad_ordinal(self):
     self.assertEquals(0, words_to_num('first two'))
コード例 #21
0
 def test_words_to_num_mixed(self):
     self.assertEquals(0, words_to_num('six hundred and bread'))
コード例 #22
0
 def test_words_to_num_simple(self):
     self.assertEquals(8, words_to_num("eight"))
コード例 #23
0
 def test_words_to_num_bad_ordinal(self):
     self.assertEquals(0, words_to_num('first two'))
コード例 #24
0
 def test_words_to_num_simple(self):
     self.assertEquals(8, words_to_num("eight"))