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

Increase German test coverage to 100% #214

Merged
merged 9 commits into from
Oct 19, 2018
11 changes: 11 additions & 0 deletions tests/test_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ def test_cardinal_for_decimal_number(self):
num2words(3.486, lang='de'), "drei Komma vier acht sechs"
)

def test_giant_cardinal_for_merge(self):
self.assertEqual(
num2words(4500072900000111, lang='de'),
"vier billiarden fünfhundert billionen " +
"zweiundsiebzig milliarden neunhundert millionen hundertelf"
)

def test_ordinal_num(self):
self.assertEqual(num2words(7, to="ordinal_num", lang='de'), "7.")
self.assertEqual(num2words(81, to="ordinal_num", lang='de'), "81.")

def test_ordinal_for_negative_numbers(self):
self.assertRaises(TypeError, num2words, -12, ordinal=True, lang='de')

Expand Down