o
    Xεi'
                     @   sJ   d Z ddlZddlZddlmZ G dd dejZedkr#e  dS dS )zTests for French    N)	sentencesc                	   @   sV   e Zd ZdZdd Zdd Zdd Zdd	 Zd
edede	j
e de	j
e fddZdS )FrenchTestCasezTest cases for Frenchc                 C   s   |  ddddgg d dS )z'Test liason after determiner (e.g., le)z
Les arbresLesle)r   r   zN_without_and_with_liasonself r   A/home/ubuntu/.local/lib/python3.10/site-packages/tests/test_fr.pytest_liason_after_determiner.   s   z+FrenchTestCase.test_liason_after_determinerc                 C      |  ddg dg d dS )z&Test liason between adjective and nounu   J’ai des petites oreilles.petites)p   ətir   )r   r   r   r   r   r   Nr   r
   r   r   r   test_liason_adjective_noun2   s   z)FrenchTestCase.test_liason_adjective_nounc                 C   s   |  dddgddg dS )z$Test liason between pronoun and verbu   On est là!Onu   ɔ̃nNr   r
   r   r   r   test_liason_pronoun_verb;   s   z'FrenchTestCase.test_liason_pronoun_verbc                 C   r   )u   Test liason with trèsu   C’est très amusant!u   très)r      ʁ   ɛ)r   r   r   r   Nr   r
   r   r   r   test_liason_tres?   s   zFrenchTestCase.test_liason_trestextliason_wordwithout_phonemeswith_phonemesc                    sx   t tt|ddd}t  fdd|D }| |j| t tt|ddd}t  fdd|D }| |j| dS )	z?Get pronunciation of a sentence with and without liason enabledfr_FRF)langpost_processc                 3       | ]
}|j  kr|V  qd S Nr   .0wr   r   r   	<genexpr>P       z:FrenchTestCase._without_and_with_liason.<locals>.<genexpr>Tc                 3   r#   r$   r%   r&   r)   r   r   r*   U   r+   N)nextiterr   assertEqualphonemes)r   r   r   r   r   sentencewordr   r)   r   r	   E   s   
z'FrenchTestCase._without_and_with_liasonN)__name__
__module____qualname____doc__r   r   r   r   strtypingListr	   r   r   r   r   r   +   s    	r   __main__)	r5   r7   unittestgruutr   TestCaser   r2   mainr   r   r   r   <module>   s   %0