mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
lang_es: Add currency PEN (#200)
This commit is contained in:
committed by
Ernesto Rodriguez Ortiz
parent
424cf9fda8
commit
dc733cfa1b
@@ -142,6 +142,17 @@ TEST_CASES_TO_CURRENCY_USD = (
|
||||
(100.00, 'cien dolares con cero centavos'),
|
||||
)
|
||||
|
||||
TEST_CASES_TO_CURRENCY_PEN = (
|
||||
(1.00, 'un sol con cero centimos'),
|
||||
(2.00, 'dos soles con cero centimos'),
|
||||
(8.00, 'ocho soles con cero centimos'),
|
||||
(12.00, 'doce soles con cero centimos'),
|
||||
(21.00, 'veintiun soles con cero centimos'),
|
||||
(81.25, 'ochenta y un soles con veinticinco centimos'),
|
||||
(350.90, 'trescientos cincuenta soles con noventa centimos'),
|
||||
(100.00, 'cien soles con cero centimos'),
|
||||
)
|
||||
|
||||
|
||||
class Num2WordsESTest(TestCase):
|
||||
|
||||
@@ -183,3 +194,10 @@ class Num2WordsESTest(TestCase):
|
||||
num2words(test[0], lang='es', to='currency', currency='USD'),
|
||||
test[1]
|
||||
)
|
||||
|
||||
def test_currency_pen(self):
|
||||
for test in TEST_CASES_TO_CURRENCY_PEN:
|
||||
self.assertEqual(
|
||||
num2words(test[0], lang='es', to='currency', currency='PEN'),
|
||||
test[1]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user