55class SimplifiedChineseTestCase (TestCase ):
66
77 def test_addition_words (self ):
8- result = mathparse .parse ('四加四' ,language = 'SIMPLIFIED_CHINESE ' )
8+ result = mathparse .parse ('四加四' , language = 'CHI ' )
99
1010 self .assertEqual (result , 8 )
1111
1212 def test_addition_words_large (self ):
13- result = mathparse .parse ('四千两百一加五百' , language = 'SIMPLIFIED_CHINESE ' )
13+ result = mathparse .parse ('四千两百一加五百' , language = 'CHI ' )
1414
1515 self .assertEqual (result , 4701 )
1616
1717 def test_subtraction_words (self ):
18- result = mathparse .parse ('三十减二十' ,language = 'SIMPLIFIED_CHINESE ' )
18+ result = mathparse .parse ('三十减二十' , language = 'CHI ' )
1919
2020 self .assertEqual (result , 10 )
2121
2222 def test_multiplication_words (self ):
23- result = mathparse .parse ('九乘九' , language = 'SIMPLIFIED_CHINESE ' )
23+ result = mathparse .parse ('九乘九' , language = 'CHI ' )
2424
2525 self .assertEqual (result , 81 )
2626
2727 def test_division_words (self ):
28- result = mathparse .parse ('十五除以五' , language = 'SIMPLIFIED_CHINESE ' )
28+ result = mathparse .parse ('十五除以五' , language = 'CHI ' )
2929
3030 self .assertEqual (result , 3 )
3131
3232 def test_division_words_large (self ):
33- result = mathparse .parse ('一千两百四除以一百' , language = 'SIMPLIFIED_CHINESE ' )
33+ result = mathparse .parse ('一千两百四除以一百' , language = 'CHI ' )
3434
3535 self .assertEqual (str (result ), '12.04' )
3636
3737 def test_sqrt (self ):
38- result = mathparse .parse ('四开方' , language = 'SIMPLIFIED_CHINESE ' )
38+ result = mathparse .parse ('四开方' , language = 'CHI ' )
3939
4040 self .assertEqual (result , 2 )
4141
4242 def test_squared (self ):
43- result = mathparse .parse ('二平方' , language = 'SIMPLIFIED_CHINESE ' )
43+ result = mathparse .parse ('二平方' , language = 'CHI ' )
4444
4545 self .assertEqual (result , 4 )
4646
4747 def test_cubed (self ):
48- result = mathparse .parse ('二立方' , language = 'SIMPLIFIED_CHINESE ' )
48+ result = mathparse .parse ('二立方' , language = 'CHI ' )
4949
50- self .assertEqual (result , 8 )
50+ self .assertEqual (result , 8 )
0 commit comments