Exemple #1
0
 def test_kansujis_001(self):
     expect = [
         {'val': '一', 'beg': 0, 'end': 1},
     ]
     self.assertListEqual(kansujis('1'), expect)
Exemple #2
0
 def test_kansujis_003(self):
     expect = [
         {'val': '一十', 'beg': 0, 'end': 2},
     ]
     self.assertListEqual(kansujis('10', True), expect)
Exemple #3
0
 def test_kansujis_010(self):
     expect = [
         {'val': '千万五十六', 'beg': 4, 'end': 14},
     ]
     self.assertListEqual(kansujis('価格は¥10,000,056です。', False), expect)
Exemple #4
0
 def test_kansujis_012(self):
     expect = [
         {'val': '一', 'beg': 0, 'end': 1},
         {'val': '二兆三十万五千一十七', 'beg': 6, 'end': 15},
     ]
     self.assertEqual(kansujis('1つの価格が二兆30万五千十7円になります。'), expect)
Exemple #5
0
 def test_empty_1(self):
     self.assertEqual(kansujis('こんにちは'), [])
Exemple #6
0
 def test_kansujis_008(self):
     expect = [
         {'val': '千万', 'beg': 0, 'end': 6},
     ]
     self.assertListEqual(kansujis('1,000万', False), expect)
Exemple #7
0
 def test_kansujis_006(self):
     expect = [
         {'val': '九十九万九千百', 'beg': 0, 'end': 6},
     ]
     self.assertListEqual(kansujis('999100', False), expect)
Exemple #8
0
 def test_empty_0(self):
     self.assertEqual(kansujis(''), [])
Exemple #9
0
 def test_kansujis_004(self):
     expect = [
         {'val': '九十九万九千九百九十九', 'beg': 0, 'end': 6},
     ]
     self.assertListEqual(kansujis('999999'), expect)