Ejemplo n.º 1
0
 def test_sis(self):
     'words ending in SIS'
     nouns = {
          'thesis': 'theses'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 2
0
 def test_eau(self):
     'words ending in EAU'
     nouns = {
          'tableau': 'tableaux'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 3
0
 def test_oot(self):
     'special case: foot'
     nouns = {
          'foot': 'feet'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 4
0
 def test_child(self):
     'special case: child'
     nouns = {
          'child': 'children'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 5
0
 def test_f_ves(self):
     'words ending in F that become VES'
     nouns = {
          'leaf': 'leaves',
          'loaf': 'loaves'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 6
0
 def test_ooth(self):
     'words ending in OOTH'
     nouns = {
          'booth': 'booths',
          'tooth': 'teeth'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 7
0
 def test_ouce(self):
     'words ending in OUSE'
     nouns = {
          'mouse': 'mice',
          'louse': 'lice'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
 def test_default(self):
     'parole comuni'
     nouns = {
         'papaya': 'papayas',
         'whip': 'whips',
         'palimpsest': 'palimpsests'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 9
0
 def test_default(self):
     'unexceptional words'
     nouns = {
         'papaya': 'papayas',
         'whip': 'whips',
         'palimpsest': 'palimpsests'
         }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 10
0
 def test_default(self):
     'unexceptional words'
     nouns = {
         'papaya': 'papayas',
         'whip': 'whips',
         'palimpsest': 'palimpsests'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 11
0
 def test_ife(self):
     'words ending in IFE'
     nouns = {
          'knife': 'knives',
          'wife': 'wives',
          'lowlife': 'lowlifes'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 12
0
 def test_y(self):
     'words ending in Y'
     nouns = {
         'utility': 'utilities',
         'vacancy': 'vacancies',
         'boy': 'boys',
         'day': 'days'
         }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 13
0
 def test_elf(self):
     'words ending in ELF'
     nouns = {
          'elf': 'elves',
          'shelf': 'shelves',
          'delf': 'delfs',
          'pelf': 'pelfs'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 14
0
 def test_man(self):
     'words ending in MAN'
     nouns = {
          'man': 'men',
          'mailman': 'mailmen',
          'human': 'humans',
          'roman': 'romans'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 15
0
 def test_man(self):
     'words ending in MAN'
     nouns = {
         'man': 'men',
         'mailman': 'mailmen',
         'human': 'humans',
         'roman': 'romans'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 16
0
 def test_man(self):
     'parole che finiscono con MAN'
     nouns = {
         'man': 'men',
         'mailman': 'mailmen',
         'human': 'humans',
         'roman': 'romans'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 17
0
 def test_y(self):
     'parole che finiscono con Y'
     nouns = {
         'utility': 'utilities',
         'vacancy': 'vacancies',
         'boy': 'boys',
         'day': 'days'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 18
0
 def test_elf(self):
     'parole che finiscono con ELF'
     nouns = {
         'elf': 'elves',
         'shelf': 'shelves',
         'delf': 'delfs',
         'pelf': 'pelfs'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 19
0
 def test_y(self):
     'words ending in Y'
     nouns = {
         'utility': 'utilities',
         'vacancy': 'vacancies',
         'boy': 'boys',
         'day': 'days'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 20
0
 def test_elf(self):
     'words ending in ELF'
     nouns = {
         'elf': 'elves',
         'shelf': 'shelves',
         'delf': 'delfs',
         'pelf': 'pelfs'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 21
0
 def test_h(self):
     'words ending in H'
     nouns = {
         'coach': 'coaches',
         'glitch': 'glitches',
         'rash': 'rashes',
         'watch': 'watches',
         'cheetah': 'cheetahs',
         'cough': 'coughs'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 22
0
 def test_h(self):
     'words ending in H'
     nouns = {
         'coach': 'coaches',
         'glitch': 'glitches',
         'rash': 'rashes',
         'watch': 'watches',
         'cheetah': 'cheetahs',
         'cough': 'coughs'
         }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 23
0
 def test_same(self):
     'parole che sono il loro stesso plurale'
     nouns = {
         'sheep': 'sheep',
         'deer': 'deer',
         'fish': 'fish',
         'moose': 'moose',
         'aircraft': 'aircraft',
         'series': 'series',
         'haiku': 'haiku'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 24
0
 def test_same(self):
     'words that are their own plural'
     nouns = {
         'sheep': 'sheep',
         'deer': 'deer',
         'fish': 'fish',
         'moose': 'moose',
         'aircraft': 'aircraft',
         'series': 'series',
         'haiku': 'haiku'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 25
0
 def test_same(self):
     'words that are their own plural'
     nouns = {
          'sheep': 'sheep',
          'deer': 'deer',
          'fish': 'fish',
          'moose': 'moose',
          'aircraft': 'aircraft',
          'series': 'series',
          'haiku': 'haiku'
          }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 26
0
 def test_sxz(self):
     'words ending in S, X, and Z'
     nouns = {
         'bass': 'basses',
         'bus': 'buses',
         'walrus': 'walruses',
         'box': 'boxes',
         'fax': 'faxes',
         'suffix': 'suffixes',
         'mailbox': 'mailboxes',
         'buzz': 'buzzes',
         'waltz': 'waltzes'
         }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 27
0
 def test_sxz(self):
     'words ending in S, X, and Z'
     nouns = {
         'bass': 'basses',
         'bus': 'buses',
         'walrus': 'walruses',
         'box': 'boxes',
         'fax': 'faxes',
         'suffix': 'suffixes',
         'mailbox': 'mailboxes',
         'buzz': 'buzzes',
         'waltz': 'waltzes'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 28
0
 def test_sxz(self):
     'parole che finiscono con S, X, o Z'
     nouns = {
         'bass': 'basses',
         'bus': 'buses',
         'walrus': 'walruses',
         'box': 'boxes',
         'fax': 'faxes',
         'suffix': 'suffixes',
         'mailbox': 'mailboxes',
         'buzz': 'buzzes',
         'waltz': 'waltzes'
     }
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 29
0
 def test_oot(self):
     'caso particolare: foot'
     nouns = {'foot': 'feet'}
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 30
0
 def test_ooth(self):
     'parole che finiscono con OOTH'
     nouns = {'booth': 'booths', 'tooth': 'teeth'}
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 31
0
 def test_plural(self):
     self.assertEqual(plural('box'),'boxes')
     self.assertEqual(plural('couch'),'couches')
     self.assertEqual(plural('ivy'),'ivies')
     self.assertEqual(plural('light'),'lights')
Ejemplo n.º 32
0
             'computer': 'computers',
             'rock': 'rocks',
             'paper': 'papers',
             
             'mouse': 'mice',
             'louse': 'lice',
             'child': 'children',
             'foot': 'feet',
             'booth': 'booths',
             'tooth': 'teeth',
             'leaf': 'leaves',
             'loaf': 'loaves',
             'thesis': 'theses',
             'man': 'men',
             'mailman': 'mailmen',
             'knife': 'knives',
             'wife': 'wives',
             'tableau': 'tableaux',
             'elf': 'elves',
             'shelf': 'shelves',
             }

for noun, correctPlural in KnownValues.nouns.items():
    testMethod = lambda self: KnownValues.failUnlessEqual(self, plural(noun), correctPlural)
    testMethod.__doc__ = "%s --> %s" % (noun, correctPlural)
    instanceMethod = new.instancemethod(testMethod, None, KnownValues)
    setattr(KnownValues, "test_%s" % noun, instanceMethod)

if __name__ == "__main__":
    unittest.main()
Ejemplo n.º 33
0
        'rock': 'rocks',
        'paper': 'papers',
        'mouse': 'mice',
        'louse': 'lice',
        'child': 'children',
        'foot': 'feet',
        'booth': 'booths',
        'tooth': 'teeth',
        'leaf': 'leaves',
        'loaf': 'loaves',
        'thesis': 'theses',
        'man': 'men',
        'mailman': 'mailmen',
        'knife': 'knives',
        'wife': 'wives',
        'tableau': 'tableaux',
        'elf': 'elves',
        'shelf': 'shelves',
    }


for noun, correctPlural in KnownValues.nouns.items():
    testMethod = lambda self: KnownValues.failUnlessEqual(
        self, plural(noun), correctPlural)
    testMethod.__doc__ = "%s --> %s" % (noun, correctPlural)
    instanceMethod = new.instancemethod(testMethod, None, KnownValues)
    setattr(KnownValues, "test_%s" % noun, instanceMethod)

if __name__ == "__main__":
    unittest.main()
Ejemplo n.º 34
0
 def test_ouce(self):
     'parole che finiscono con OUSE'
     nouns = {'mouse': 'mice', 'louse': 'lice'}
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 35
0
 def test_sis(self):
     'parole che finiscono con SIS'
     nouns = {'thesis': 'theses'}
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 36
0
 def test_f_ves(self):
     'parole che finiscono con una F che diventa VES'
     nouns = {'leaf': 'leaves', 'loaf': 'loaves'}
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 37
0
 def test_eau(self):
     'parole che finiscono con EAU'
     nouns = {'tableau': 'tableaux'}
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)
Ejemplo n.º 38
0
 def test_ife(self):
     'parole che finiscono con IFE'
     nouns = {'knife': 'knives', 'wife': 'wives', 'lowlife': 'lowlifes'}
     for singular, plural in nouns.items():
         self.assertEqual(plural6.plural(singular), plural)