Ë
    i›¾jå  ã                   ó¤   — d dl Z d dlmZ  G d„ d«      Z G d„ d«      Z G d„ d«      Z G d	„ d
«      Z G d„ d«      Z G d„ d«      Z G d„ d«      Z	y)é    N)Ú	translatec                   ó   — e Zd Zd„ Zd„ Zd„ Zy)ÚTestHypothesisc                 óŠ   — ddgddgddgg}|D ]3  }t        j                  |d   Ž }t        j                  |d   Ž }||k  rŒ3J ‚ y )	N©Úthisg      ð?)Úthatg       @)úthis and thatg      @)Úanotherg      L@)zim lessçš™™™™™É?)zI'm greaterg      @r   é   )r   Ú
Hypothesis)ÚselfÚ
test_casesÚ	test_caseÚfirstÚseconds        ú^/home/spazio/kingdom_calls/work5/transenv/lib/python3.12/site-packages/tests/test_translate.pyÚtest_less_thanzTestHypothesis.test_less_than   sh   € à˜MÐ*Ø#Ð%6Ð7ØÐ3Ð4ð
ˆ
ð
 $ò 	"ˆIÜ×(Ñ(¨)°A©,Ð7ˆEÜ×)Ñ)¨9°Q©<Ð8ˆFØ˜6“>Ð!�>ñ	"ó    c                 óv   — dddœdddœg}|D ]*  }t        t        j                  |d   Ž «      }||d   k(  rŒ*J ‚ y )Nr   z('this', 1.0)©ÚinputÚoutput)za wordg      A@z('a word', 34.0)r   r   )Ústrr   r   )r   r   r   Ústrings       r   Útest_stringzTestHypothesis.test_string   sX   € à#¨Ñ?Ø&Ð2DÑEð
ˆ
ð $ò 	1ˆIÜœ×-Ñ-¨y¸Ñ/AÐBÓCˆFØ˜Y xÑ0Ó0Ð0Ð0ñ	1r   c                 ó€   — dddœdddœg}|D ]/  }t        j                  |d   Ž j                  «       }||d   k(  rŒ/J ‚ y )N)r   r   z('this', 0.2)r   )zanother thingg      @z('another thing', 3.0)r   r   )r   r   Ú__repr__)r   r   r   Úcurrent_reprs       r   Ú	test_reprzTestHypothesis.test_repr   s\   € à#¨Ñ?Ø,Ð8PÑQð
ˆ
ð $ò 	7ˆIÜ$×/Ñ/°¸7Ñ1CÐD×MÑMÓOˆLØ 9¨XÑ#6Ó6Ð6Ð6ñ	7r   N)Ú__name__Ú
__module__Ú__qualname__r   r   r!   © r   r   r   r      s   „ ò	"ò1ó7r   r   c                   ó*   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zy)ÚTestITranslationc                 ó¦   — t        j                  t        «      5  t        j                  «       j                  d«       d d d «       y # 1 sw Y   y xY w)Nz
some input)ÚpytestÚraisesÚNotImplementedErrorr   ÚITranslation©r   s    r   Útest_translatezTestITranslation.test_translate%   s;   € Ü�]‰]Ô.Ó/ñ 	=Ü×"Ñ"Ó$×.Ñ.¨|Ô<÷	=÷ 	=ñ 	=úó   š$AÁAc                 ó¦   — t        j                  t        «      5  t        j                  «       j                  d«       d d d «       y # 1 sw Y   y xY w)Núthis is some text)r)   r*   r+   r   r,   Ú
hypothesesr-   s    r   Útest_hypothesesz TestITranslation.test_hypotheses)   s@   € Ü�]‰]Ô.Ó/ñ 	EÜ×"Ñ"Ó$×/Ñ/Ð0CÔD÷	E÷ 	Eñ 	Eúr/   c                 ó‚   — dddgdœdddgdœg}|D ],  }t         j                  j                  |d   «      |d	   k(  rŒ,J ‚ y )
Nzfirst
and second liner   zand second liner   zthis is
 on two lineszthis isz on two linesr   r   )r   r,   Úsplit_into_paragraphs©r   r   r   s      r   Útest_split_into_paragraphsz+TestITranslation.test_split_into_paragraphs-   se   € à.¸7ÐDUÐ:VÑWØ.¸9ÀoÐ:VÑWð
ˆ
ð $ò 	ˆIä×&Ñ&×<Ñ<¸YÀwÑ=OÓPØ˜XÑ&ó'ðð'ñ	r   c                 ó‚   — ddgddœddgddœg}|D ],  }t         j                  j                  |d   «      |d	   k(  rŒ,J ‚ y )
Nr
   zalong with thiszthis and that
along with thisr   zone.zand two.zone.
and two.r   r   )r   r,   Úcombine_paragraphsr6   s      r   Útest_combine_paragraphsz(TestITranslation.test_combine_paragraphs8   so   € ð *Ð+<Ð=Ø:ñð
 ! *Ð-Ø*ñð	
ˆ
ð $ò 	ˆIä×&Ñ&×9Ñ9¸)ÀGÑ:LÓMØ˜XÑ&ó'ðð'ñ	r   c                 óþ   — t        j                  t        «      5  t        t	        j
                  «       «       d d d «       t	        j
                  «       }d|_        d|_        t        |«      dk(  sJ ‚y # 1 sw Y   Œ<xY w)NÚEnglishÚSpanishzEnglish -> Spanish)	r)   r*   ÚAttributeErrorr   r   r,   Ú	from_langÚto_langÚrepr)r   Útranslations     r   r   zTestITranslation.test_stringI   sh   € Ü�]‰]œ>Ó*ñ 	*Ü”	×&Ñ&Ó(Ô)÷	*ô  ×,Ñ,Ó.ˆØ )ˆÔØ'ˆÔä�KÓ Ð$8Ò8Ð8Ñ8÷	*ð 	*ús   šA3Á3A<N)r"   r#   r$   r.   r3   r7   r:   r   r%   r   r   r'   r'   $   s   „ ò=òEò	òó"	9r   r'   c                   ó   — e Zd Zd„ Zd„ Zy)ÚTestLanguagec                 óL   — t        t        j                  dd«      «      dk(  sJ ‚y )NÚesr=   )r   r   ÚLanguager-   s    r   r   zTestLanguage.test_stringV   s"   € Ü”9×%Ñ% d¨IÓ6Ó7¸9ÒDÐDÑDr   c                 óF  — t        j                  dd«      }t        j                  dd«      j                  |«      �J ‚t        j                  dd«      }t        j                  dd«      }||_        |j                  j                  |«       |j                  |«      |k(  sJ ‚y )NÚenr<   rF   r=   )r   rG   Úget_translationr@   Útranslations_fromÚappend)r   ÚtorF   rI   s       r   Útest_get_translationz!TestLanguage.test_get_translationY   s�   € ä×Ñ  iÓ0ˆÜ×!Ñ! $¨	Ó2×BÑBÀ2ÓFÐNÐNÐNä×Ñ  iÓ0ˆÜ×Ñ  iÓ0ˆØˆŒ
à
×Ñ×#Ñ# BÔ'Ø×!Ñ! "Ó%¨Ò+Ð+Ñ+r   N)r"   r#   r$   r   rN   r%   r   r   rD   rD   U   s   „ òEó
,r   rD   c                   ó   — e Zd Ze y)ÚTestPackageTranslationN©r"   r#   r$   ÚNotImplementedr%   r   r   rP   rP   f   ó   „ Úr   rP   c                   ó   — e Zd Zd„ Zy)ÚTestIdentityTranslationc                 ó  — t        j                  dd«      }t        j                  |«      }|j                  dd«      }|D ]@  }t	        |t         j
                  «      sJ ‚|j                  dk(  sJ ‚|j                  dk(  rŒ@J ‚ y )NrF   r=   r1   r   r   )r   rG   ÚIdentityTranslationr2   Ú
isinstancer   ÚscoreÚvalue)r   ÚlangÚidentity_translationÚreturnedÚsingle_returns        r   r3   z'TestIdentityTranslation.test_hypothesesk   s†   € Ü×!Ñ! $¨	Ó2ˆÜ(×<Ñ<¸TÓBÐØ'×2Ñ2Ð3FÈÓJˆØ%ò 	>ˆMÜ˜m¬Y×-AÑ-AÔBÐBÐBØ ×&Ñ&¨!Ò+Ð+Ð+Ø ×&Ñ&Ð*=Ó=Ð=Ð=ñ	>r   N©r"   r#   r$   r3   r%   r   r   rU   rU   j   s   „ ó>r   rU   c                   ó   — e Zd Zd„ Zy)ÚTestCompositeTranslationc                 ó®  — t        j                  dd«      }t        j                  dd«      }t        j                  |«      }t        j                  |«      }t        j                  ||«      }|j	                  dd«      }t        |«      dk(  sJ ‚t        |d   t         j                  «      sJ ‚|d   j                  dk(  sJ ‚|d   j                  dk(  sJ ‚y )NrI   r<   rF   r=   zThis is some textr   r   )
r   rG   rW   ÚCompositeTranslationr2   ÚlenrX   r   rY   rZ   )r   Úlang_oneÚlang_twoÚt1Út2Ú	compositer   s          r   r3   z(TestCompositeTranslation.test_hypothesesv   sÄ   € Ü×%Ñ% d¨IÓ6ˆÜ×%Ñ% d¨IÓ6ˆä×*Ñ*¨8Ó4ˆÜ×*Ñ*¨8Ó4ˆä×2Ñ2°2°rÓ:ˆ	Ø×%Ñ%Ð&9¸1Ó=ˆÜ�6‹{˜aÒÐÐÜ˜& ™)¤Y×%9Ñ%9Ô:Ð:Ð:Ø�a‰y�‰ !Ò#Ð#Ð#Ø�a‰y�‰Ð"5Ò5Ð5Ñ5r   Nr_   r%   r   r   ra   ra   u   s   „ ó6r   ra   c                   ó   — e Zd Ze y)ÚTestCachedTranslationNrQ   r%   r   r   rk   rk   …   rS   r   rk   )
r)   Úargostranslater   r   r'   rD   rP   rU   ra   rk   r%   r   r   ú<module>rm      sR   ðÛ Ý $÷7ñ 7÷>.9ñ .9÷b,ñ ,÷"ñ ÷>ñ >÷6ñ 6÷ ò r   