Esempio n. 1
0
 def test_empty(self):
     adj = Adjective("")
     adj.is_singular()
     adj.is_plural()
     adj.singular()
     adj.plural()
     adj.comparative()
     adj.superlative()
Esempio n. 2
0
 def test_to_comparative(self):
     for adjective, comparative, _ in self.test_comparative_superlative_args:
         with self.subTest():
             test_case = {
                 "in": adjective,
                 "out": comparative,
                 "desc":
                 f"Adjective({repr(adjective)}).comparative() => {repr(comparative)}",
                 "kwargs": {}
             }
             adj = Adjective(test_case["in"])
             self.assertEqual(adj.comparative(**test_case["kwargs"]),
                              test_case["out"], test_case["desc"])
Esempio n. 3
0
 def test_from_comp_to_comp(self):
     comparative_exceptions = ["better", "worse", "further", "more"]
     for comparative in comparative_exceptions:
         with self.subTest():
             test_case = {
                 "in": comparative,
                 "out": comparative,
                 "desc":
                 f"Adjective({repr(comparative)}).comparative() => {repr(comparative)}",
                 "kwargs": {}
             }
             adj = Adjective(test_case["in"])
             self.assertEqual(adj.comparative(**test_case["kwargs"]),
                              test_case["out"], test_case["desc"])