示例#1
0
 def test_two(self):
     assert "two" == num_to_word(2)
示例#2
0
 def test_one_thousand_two_hundred_thirty_two(self):
     assert "onethousandtwohundredthirtytwo" == num_to_word(1232)
示例#3
0
 def test_one(self):
     assert "one" == num_to_word(1)
示例#4
0
 def test_one_hundred_twenty_three(self):
     assert "onehundredtwentythree" == num_to_word(123)
示例#5
0
 def test_one_thousand(self):
     assert "onethousand" == num_to_word(1000)
示例#6
0
 def test_one_hundred(self):
     assert "onehundred" == num_to_word(100)
示例#7
0
 def test_three_hundred(self):
     assert "threehundred" == num_to_word(300)
示例#8
0
 def test_thirty(self):
     assert "thirty" == num_to_word(30)
示例#9
0
 def test_fifty_three(self):
     assert "fiftythree" == num_to_word(53)
示例#10
0
 def test_twenty_one(self):
     assert "twentyone" == num_to_word(21)
示例#11
0
 def test_twenty_two(self):
     assert "twentytwo" == num_to_word(22)
示例#12
0
 def test_twenty(self):
     assert "twenty" == num_to_word(20)
示例#13
0
 def test_nineteen(self):
     assert "nineteen" == num_to_word(19)
示例#14
0
 def test_eleven(self):
     assert "eleven" == num_to_word(11)
示例#15
0
 def test_ten(self):
     assert "ten" == num_to_word(10)
示例#16
0
from numtoword.numtoword import num_to_word

print(num_to_word(21))
print(num_to_word(121))
print(num_to_word(120))
print(num_to_word(2235))