From f381deca3c4eb150948e9aadd6610e14b012131c Mon Sep 17 00:00:00 2001 From: Marlon Rodriguez Garcia Date: Tue, 19 Nov 2024 14:36:05 -0500 Subject: [PATCH] Add test to improve coverage --- tests/test_base.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/test_base.py b/tests/test_base.py index efa1bc81..c9abe14d 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -62,3 +62,27 @@ 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 + ) + + def test_pluralize_not_implemented(self): + with self.assertRaises(NotImplementedError): + self.base.pluralize(n=None, forms=None)