mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Convert strings to Decimal values
Punt string handling to python Decimal object, this correctly represents both integers and floats (except with regards to trailing zeros) Change command line tests to reflect handling of ints
This commit is contained in:
@@ -72,7 +72,7 @@ class CliTestCase(unittest.TestCase):
|
||||
self.assertEqual(output.return_code, 0)
|
||||
self.assertEqual(
|
||||
output.out.strip(),
|
||||
"one hundred and fifty point zero"
|
||||
"one hundred and fifty"
|
||||
)
|
||||
|
||||
def test_cli_with_lang(self):
|
||||
@@ -82,7 +82,7 @@ class CliTestCase(unittest.TestCase):
|
||||
self.assertEqual(output.return_code, 0)
|
||||
self.assertEqual(
|
||||
output.out.strip(),
|
||||
"ciento cincuenta punto cero"
|
||||
"ciento cincuenta"
|
||||
)
|
||||
|
||||
def test_cli_with_lang_to(self):
|
||||
|
||||
Reference in New Issue
Block a user