MCPcopy Index your code
hub / github.com/clips/pattern / test_tenses

Method test_tenses

test/test_es.py:168–181  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

166 print "pattern.es.inflect.lexeme()"
167
168 def test_tenses(self):
169 # Assert tense recognition.
170 self.assertTrue((es.PRESENT, 3, es.SG) in es.tenses("es"))
171 self.assertTrue("2sg" in es.tenses("eres"))
172 # The CONDITIONAL is sometimes described as a mood,
173 # and sometimes as a tense of the indicative mood (e.g., in Spanish):
174 t1 = (es.CONDITIONAL, 1, es.SG)
175 t2 = (es.PRESENT, 1, es.SG, es.CONDITIONAL)
176 self.assertTrue("1sg->" in es.tenses(u"sería"))
177 self.assertTrue(t1 in es.tenses(u"sería"))
178 self.assertTrue(t2 in es.tenses(u"sería"))
179 self.assertTrue(t1 in es.tenses(es.conjugate("ser", mood=es.INDICATIVE, tense=es.CONDITIONAL)))
180 self.assertTrue(t2 in es.tenses(es.conjugate("ser", mood=es.CONDITIONAL)))
181 print "pattern.es.tenses()"
182
183#---------------------------------------------------------------------------------------------------
184

Callers

nothing calls this directly

Calls 2

conjugateMethod · 0.80
tensesMethod · 0.45

Tested by

no test coverage detected