ó
    ×›‘hß  ã                   ó  • S r SSKJr  SSKJr  SSKJr  Sr " S S\R                  5      r	 " S S	\R                  5      r
 " S
 S\R                  5      r " S S\R                  5      r " S S\R                  5      rg)z#
Tests for L{twisted.python.text}.
é    )ÚStringIO)Útext)Úunittesta¬  Every attempt to employ mathematical methods in the study of chemical
questions must be considered profoundly irrational and contrary to the
spirit of chemistry ...  If mathematical analysis should ever hold a
prominent place in chemistry - an aberration which is happily almost
impossible - it would occasion a rapid and widespread degeneration of that
science.

           --  Auguste Comte, Philosophie Positive, Paris, 1838
c                   óJ   • \ rS rSrSrS
S jrS
S jrS
S jrS
S jrS
S jr	S	r
g)Ú	WrapTestsé   z
Tests for L{text.greedyWrap}.
Nc                 ó˜   • SU l         [        R                  5       U l        [        R
                  " [        U R                   5      U l        g )NéH   )Ú	lineWidthÚ
sampleTextÚsplitÚsampleSplitTextr   ÚwordWrapÚoutput©Úselfs    ÚZC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/test/test_text.pyÚsetUpÚWrapTests.setUp   s0   € ØˆŒÜ)×/Ñ/Ó1ˆÔÜ—m’m¤J°·±Ó?ˆ�ó    c                 óÎ   • / nU R                    H"  nUR                  UR                  5       5        M$     [        U5      n[        U R                  5      nU R                  X45        g)z
Compare the number of words.
N)r   Úextendr   Úlenr   ÚassertEqual)r   ÚwordsÚlineÚ	wordCountÚsampleTextWordCounts        r   Útest_wordCountÚWrapTests.test_wordCount"   sQ   € ð ˆØ—K”KˆDØ�L‰L˜Ÿ™›Ö&ñ  ä˜“Jˆ	Ü! $×"6Ñ"6Ó7Ðà×Ñ˜Õ8r   c                 ó¨   • / nU R                    H"  nUR                  UR                  5       5        M$     U R                  U R                  U:H  5        g)z
Compare the lists of words.
N)r   r   r   Ú
assertTruer   )r   r   r   s      r   Útest_wordMatchÚWrapTests.test_wordMatch.   sB   € ð ˆØ—K”KˆDØ�L‰L˜Ÿ™›Ö&ñ  ð
 	�‰˜×,Ñ,°Ñ5Õ6r   c                 ó$  • / nU R                    H8  n[        U5      U R                  ::  a  M  UR                  [        U5      5        M:     U(       a?  U R	                  S[        U5      [        U R                   5      U R                  U4-  5        gg)z 
Check the length of the lines.
z%%d of %d lines were too long.
%d < %sN)r   r   r   ÚappendÚfail)r   Úfailuresr   s      r   Útest_lineLengthÚWrapTests.test_lineLength:   su   € ð ˆØ—K”KˆDÜ�t“9 §¡Õ.Ø—‘¤ D£	Ö*ñ  ö Ø�I‰IðÜ  ›]¬C°·±Ó,<¸d¿n¹nÈhÐWñXõð r   c                 óp   • Sn[         R                  " XR                  5      nU R                  U/ SQ5        g)z7
        Allow paragraphs delimited by two 
s.
        zet

phone
home.)ÚetÚ zphone home.r-   N)r   r   r   r   )r   r   Úresults      r   Útest_doubleNewlineÚWrapTests.test_doubleNewlineI   s,   € ð *ˆ
Ü—’˜z¯>©>Ó:ˆØ×Ñ˜Ò!>Õ?r   )r   r   r   ©ÚreturnN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r#   r)   r/   Ú__static_attributes__© r   r   r   r      s"   † ñô@ô

9ô
7ô÷@r   r   c                   ó,   • \ rS rSrSrSS jrSS jrSrg)Ú	LineTestséR   z0
Tests for L{isMultiline} and L{endsInNewline}.
Nc                 ó¨   • Sn[         R                  " U5      nU R                  U5        Sn[         R                  " U5      nU R                  U5        g)zH
L{text.isMultiline} returns C{True} if the string has a newline in it.
zThis code
 "breaks."zThis code does not "break."N)r   ÚisMultiliner"   ÚassertFalse©r   ÚsÚms      r   Útest_isMultilineÚLineTests.test_isMultilineW   sH   € ð $ˆÜ×Ò˜QÓˆØ�‰˜Ôà)ˆÜ×Ò˜QÓˆØ×Ñ˜Õr   c                 ó¨   • Sn[         R                  " U5      nU R                  U5        Sn[         R                  " U5      nU R                  U5        g)zH
L{text.endsInNewline} returns C{True} if the string ends in a newline.
znewline
ÚoldlineN)r   ÚendsInNewliner"   r?   r@   s      r   Útest_endsInNewlineÚLineTests.test_endsInNewlinec   sH   € ð ˆÜ×Ò˜qÓ!ˆØ�‰˜ÔàˆÜ×Ò˜qÓ!ˆØ×Ñ˜Õr   r9   r1   )r3   r4   r5   r6   r7   rC   rH   r8   r9   r   r   r;   r;   R   s   † ñô
÷
r   r;   c                   ó6   • \ rS rSrSrSS jrSS jrSS jrSrg)	ÚStringyStringTestsép   z"
Tests for L{text.stringyString}.
Nc                 óX   • Sn[         R                  " U5      nU R                  US5        g)z1
Tuple elements are displayed on separate lines.
)ÚaÚbz	(a,
 b,)
N©r   ÚstringyStringr   r@   s      r   Ú
test_tupleÚStringyStringTests.test_tupleu   s)   € ð ˆÜ×Ò˜qÓ!ˆØ×Ñ˜˜MÕ*r   c                 ó\   • SS0n[         R                  " U5      nU R                  US5        g)z.
Dicts elements are displayed using C{str()}.
rN   r   z{a: 0}NrP   r@   s      r   Ú	test_dictÚStringyStringTests.test_dict}   s-   € ð �!ˆHˆÜ×Ò˜qÓ!ˆØ×Ñ˜˜HÕ%r   c                 ó\   • SS/n[         R                  " U5      nU R                  US5        g)z?
List elements are displayed on separate lines using C{str()}.
rN   rO   z	[a,
 b,]
NrP   r@   s      r   Ú	test_listÚStringyStringTests.test_list…   s-   € ð �#ˆJˆÜ×Ò˜qÓ!ˆØ×Ñ˜˜MÕ*r   r9   r1   )	r3   r4   r5   r6   r7   rR   rU   rX   r8   r9   r   r   rK   rK   p   s   † ñô+ô&÷+r   rK   c                   ó,   • \ rS rSrSrSS jrSS jrSrg)Ú
SplitTestséŽ   z 
Tests for L{text.splitQuoted}.
Nc                 ó\   • Sn[         R                  " U5      nU R                  / SQU5        g)z*
Splitting strings with one-word phrases.
zThis code "works.")ÚThisÚcodezworks.N©r   ÚsplitQuotedr   ©r   rA   Úrs      r   Útest_oneWordÚSplitTests.test_oneWord“   s*   € ð !ˆÜ×Ò˜QÓˆØ×ÑÒ3°QÕ7r   c                 ó\   • Sn[         R                  " U5      nU R                  / SQU5        g )NzThe "hairy monkey" likes pie.)ÚThezhairy monkeyÚlikeszpie.r`   rb   s      r   Útest_multiWordÚSplitTests.test_multiWord›   s(   € Ø+ˆÜ×Ò˜QÓˆØ×ÑÒAÀ1ÕEr   r9   r1   )r3   r4   r5   r6   r7   rd   ri   r8   r9   r   r   r[   r[   Ž   s   † ñô8÷Fr   r[   c                   óÜ   • \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSrg)ÚStrFileTestsé®   Nc                 ó$   • [        S5      U l        g ©Nzthis is a test string)r   Úior   s    r   r   ÚStrFileTests.setUp¯   s   € ÜÐ2Ó3ˆ�r   c                 ó   • g )Nr9   r   s    r   ÚtearDownÚStrFileTests.tearDown²   s   € Ør   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚx©r?   r   ÚstrFilerp   r   s    r   Útest_1_fÚStrFileTests.test_1_fµ   s   € Ø×ÑœŸš c¨4¯7©7Ó3Õ4r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚt©r"   r   rx   rp   r   s    r   Útest_1_1ÚStrFileTests.test_1_1¸   ó   € Ø�‰œŸš S¨$¯'©'Ó2Õ3r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚhr}   r   s    r   Útest_1_2ÚStrFileTests.test_1_2»   r€   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚir}   r   s    r   Útest_1_3ÚStrFileTests.test_1_3¾   r€   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NrA   r}   r   s    r   Útest_1_4ÚStrFileTests.test_1_4Á   r€   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚnr}   r   s    r   Útest_1_5ÚStrFileTests.test_1_5Ä   r€   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚgr}   r   s    r   Útest_1_6ÚStrFileTests.test_1_6Ç   r€   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚthir}   r   s    r   Útest_3_1ÚStrFileTests.test_3_1Ê   ó   € Ø�‰œŸš U¨D¯G©GÓ4Õ5r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚhisr}   r   s    r   Útest_3_2ÚStrFileTests.test_3_2Í   r˜   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )Nzis r}   r   s    r   Útest_3_3ÚStrFileTests.test_3_3Ð   r˜   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚingr}   r   s    r   Útest_3_4ÚStrFileTests.test_3_4Ó   r˜   r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )NÚblarw   r   s    r   Útest_3_fÚStrFileTests.test_3_fÖ   s   € Ø×ÑœŸš e¨T¯W©WÓ5Õ6r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )Nzthis is a testr}   r   s    r   Útest_large_1ÚStrFileTests.test_large_1Ù   s   € Ø�‰œŸšÐ%5°t·w±wÓ?Õ@r   c                 ód   • U R                  [        R                  " SU R                  5      5        g )Nzis a test stringr}   r   s    r   Útest_large_2ÚStrFileTests.test_large_2Ü   s   € Ø�‰œŸšÐ%7¸¿¹ÓAÕBr   c                 ód   • U R                  [        R                  " SU R                  5      5        g )Nzds jhfsa k fdasrw   r   s    r   Útest_large_fÚStrFileTests.test_large_fß   s    € Ø×ÑœŸšÐ&7¸¿¹ÓAÕBr   c                 ód   • U R                  [        R                  " SU R                  5      5        g )Nz-djhsakj dhsa fkhsa s,mdbnfsauiw bndasdf hreewrw   r   s    r   Útest_overlarge_fÚStrFileTests.test_overlarge_fâ   s#   € Ø×ÑÜ�LŠLÐHÈ$Ï'É'ÓRõ	
r   c                 ód   • U R                  [        R                  " SU R                  5      5        g ro   r}   r   s    r   Ú	test_selfÚStrFileTests.test_selfç   s   € Ø�‰œŸšÐ%<¸d¿g¹gÓFÕGr   c                 óf   • U R                  [        R                  " SU R                  S5      5        g )NzThIs is A test STRINGFr}   r   s    r   Útest_insensitiveÚStrFileTests.test_insensitiveê   s    € Ø�‰œŸšÐ%<¸d¿g¹gÀuÓMÕNr   )rp   r1   )r3   r4   r5   r6   r   rs   ry   r~   rƒ   r‡   rŠ   rŽ   r’   r–   r›   rž   r¢   r¦   r©   r¬   r¯   r²   rµ   r¸   r8   r9   r   r   rl   rl   ®   sk   † ô4ôô5ô4ô4ô4ô4ô4ô4ô6ô6ô6ô6ô7ôAôCôCô
ô
H÷Or   rl   N)r7   rp   r   Útwisted.pythonr   Útwisted.trialr   r   ÚTestCaser   r;   rK   r[   rl   r9   r   r   Ú<module>r½      s~   ðñõ å Ý "ð€
ô7@�×!Ñ!ô 7@ôt�×!Ñ!ô ô<+˜×*Ñ*ô +ô<F�×"Ñ"ô Fô@=O�8×$Ñ$õ =Or   