mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Cleanup (#194)
* Remove some dead code. * Overloadable _cents_terse * One setup should be enough * Move gen_high_numwords up * Cards are optional. * Line length * DRY set_hight_numwords for EU base. * Remove unused error message. It has to be an exception anyway.
This commit is contained in:
committed by
Ernesto Rodriguez Ortiz
parent
44354bf9ce
commit
2a99ff1061
@@ -30,6 +30,15 @@ class Num2WordsENTest(TestCase):
|
||||
self.assertEqual(num2words(12.53), "twelve point five three")
|
||||
self.assertEqual(num2words(12.59), "twelve point five nine")
|
||||
|
||||
def test_overflow(self):
|
||||
with self.assertRaises(OverflowError):
|
||||
num2words("1000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000"
|
||||
"00000000000000000000000000000000")
|
||||
|
||||
def test_to_currency(self):
|
||||
self.assertEqual(
|
||||
num2words('38.4', lang='en', to='currency', seperator=' and',
|
||||
|
||||
Reference in New Issue
Block a user