Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More it-it long form number tests #172

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions test/test_format_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,31 @@ def test_convert_hundreds(self):
"ottocento novantaseimila seicento trentanove"
" milioni, seicento trentunomila, ottocento"
" novantatre")
self.assertEqual(pronounce_number(1000000000, lang="it"),
"Un miliardo")
self.assertEqual(pronounce_number(1000000001, lang="it"),
"Un miliardo, uno")
self.assertEqual(pronounce_number(1000000050, lang="it"),
"Un miliardo, cinquanta")
self.assertEqual(pronounce_number(1000123456, lang="it"),
"Un miliardo, cento ventri tre mila, "
ChanceNCounter marked this conversation as resolved.
Show resolved Hide resolved
"quattrocento cinquanta sei")
self.assertEqual(pronounce_number(1234567890, lang="it"),
"Un miliardo, due cento trenta quattro milioni, "
"cinquecento sessanta sette mila, ottocento novanta")
self.assertEqual(pronounce_number(1000000000000, lang="it"),
"Un bilione")
self.assertEqual(pronounce_number(1000000000001, lang="it"),
"Un bilione, uno")
self.assertEqual(pronounce_number(1000000500001, lang="it"),
"Un bilione, cinquecento mila, uno")
self.assertEqual(pronounce_number(1000000000000000, lang="it"),
"Un biliardo")
self.assertEqual(pronounce_number(1000000000000050, lang="it"),
"Un biliardo, cinquanta")
self.assertEqual(pronounce_number(1000000000123456, lang="it"),
"Un biliardo, cento venti tre mila, quattrocento "
"cinquanta sei")

def test_convert_scientific_notation(self):
"""
Expand Down