def test_uninstalled_mode(self): with self.assertRaises(apertium.ModeNotInstalled): apertium.generate('spa', 'cat<n><pl>')
def test_multiple(self): lexical_units = apertium.generate('en', '^cat<n><pl>$ ^cat<n><pl>$') self.assertEqual(lexical_units, 'cats cats')
def test_bare(self): lexical_units = apertium.generate('en', 'cat<n><pl>') self.assertEqual(lexical_units, 'cat<n><pl>')
def test_single(self): wordform = apertium.generate('en', '^cat<n><pl>$') self.assertEqual(wordform, 'cats')