Skip to content

Commit

Permalink
Add test to improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Marlon Rodriguez Garcia committed Nov 19, 2024
1 parent 8c712e9 commit c202950
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,23 @@ def test_is_title(self):
self.base.title("one"),
"one"
)

def test_set_high_numwords_not_implemented(self):
with self.assertRaises(NotImplementedError):
self.base.set_high_numwords()

def test_to_ordinal_num(self):
from num2words.base import Num2Word_Base
self.base = Num2Word_Base()
self.assertEqual(
self.base.to_ordinal_num(1),
1
)
self.assertEqual(
self.base.to_ordinal_num(100),
100
)
self.assertEqual(
self.base.to_ordinal_num(1000),
1000
)

0 comments on commit c202950

Please sign in to comment.