def test_is_countable_noun_true(self): base = Noun('dog') self.assertTrue(is_countable_noun(base)) self.assertTrue(is_countable_noun(base.plural())) self.assertTrue(is_countable_noun(base.definite())) self.assertTrue(is_countable_noun(base.indefinite())) self.assertTrue(is_countable_noun(base.capitalize().bold()))
def test_to_basic_noun_special_plural(self): original = Noun('bob', 'boberino') self.assertEqual(original.to_basic_noun(), original) self.assertEqual(original.plural().to_basic_noun(), original) self.assertEqual(original.bold().to_basic_noun(), original) self.assertEqual(original.indefinite().to_basic_noun(), original) self.assertEqual(original.definite().to_basic_noun(), original) self.assertEqual(original.definite().plural().to_basic_noun(), original) self.assertEqual( original.capitalize().plural().definite().to_basic_noun(), original)
def test_capitalize_preserves_tags(self): noun = Noun('ABC', tags=self.plural_proper) self.assertEqual(noun, noun.capitalize())
def test_capitalize_first_letter_capital(self): noun = Noun('ABC') self.assertEqual(noun, noun.capitalize())