mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Refactor and fix some issues with to_currency. Reduce code duplication. (#129)
* Refactor and fix some issues with to_currency. Reduce code duplication. * Use unicode literals in uk testcase.
This commit is contained in:
committed by
Ernesto Rodriguez Ortiz
parent
abae0b56a2
commit
f9d8868794
15
tests/test_lv.py
Normal file
15
tests/test_lv.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from unittest import TestCase
|
||||
|
||||
from num2words import num2words
|
||||
|
||||
|
||||
class Num2WordsLVTest(TestCase):
|
||||
def test_to_currency(self):
|
||||
self.assertEqual(
|
||||
num2words('38.4', lang='lv', to='currency', seperator=' un',
|
||||
cents=False, currency='EUR'),
|
||||
"trīsdesmit astoņi eiro un 40 centi"
|
||||
)
|
||||
Reference in New Issue
Block a user