diff --git a/tests/test_inflector_es.py b/tests/test_inflector_es.py index 3c6781e..1ca7d24 100644 --- a/tests/test_inflector_es.py +++ b/tests/test_inflector_es.py @@ -111,6 +111,10 @@ def test_all_verbs_have_templates(): ['yo parecería', 'tú parecerías', 'él parecería', 'nosotros pareceríamos', 'vosotros pareceríais', 'ellos parecerían']), ('parecer', 'indicativo', 'pretérito-perfecto-compuesto', ['yo he parecido', 'tú has parecido', 'él ha parecido', 'nosotros hemos parecido', 'vosotros habéis parecido', 'ellos han parecido']), + ('abolir', 'indicativo', 'presente', + ['yo abolo', 'tú aboles', 'él abole', 'nosotros abolimos', 'vosotros abolís', 'ellos abolen']), + ('abolir', 'subjuntivo', 'futuro', + ['yo aboliere', 'tú abolieres', 'él aboliere', 'nosotros aboliéremos', 'vosotros aboliereis', 'ellos abolieren']) ] @pytest.mark.parametrize("infinitive,mood,tense,expected_result", @@ -118,6 +122,20 @@ def test_all_verbs_have_templates(): def test_inflector_es_conjugate_mood_tense(infinitive, mood, tense, expected_result): assert cg.conjugate_mood_tense(infinitive, mood, tense) == expected_result +def test_abolir(): + """ + Reproduce error: + + > co.template.moods[persons_mood_name].tenses[aux_tense_name].person_endings] + E KeyError: 'presente' + + ../../PyVEnvs/Py311/lib/python3.11/site-packages/verbecc/inflector.py:259: KeyError + + Error was occuring because the "" was empty in the "abol:ir" template. + """ + result = cg.conjugate('abolir') + assert result is not None + def test_inflector_es_get_conj_obs(): co = cg._inflector._get_conj_obs('abañar') assert co.verb.infinitive == "abañar" diff --git a/verbecc/data/conjugations-es.xml b/verbecc/data/conjugations-es.xml index c5a259a..0c59f91 100644 --- a/verbecc/data/conjugations-es.xml +++ b/verbecc/data/conjugations-es.xml @@ -95,6 +95,38 @@ + +

a

+

as

+

a

+

amos

+

áis

+

lan

+
+ +

iera

+

ieras

+

iera

+

iéramos

+

ierais

+

ieran

+
+ +

iese

+

ieses

+

iese

+

iésemos

+

ieseis

+

iesen

+
+ +

iere

+

ieres

+

iere

+

iéremos

+

iereis

+

ieren

+
@@ -209,7 +241,7 @@

uareis

uaren

- +

úa