§
    ÈtºfHˆ  ã                   óÎ  — d Z ddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZ ddlmZ 	 ddlZddlZeZeZn# e$ r dZdZY nw xY wddlmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlm Z  ddl!m"Z" ddl#m$Z$m%Z% ddl&m'Z(  e ej)        ¦  «         *                    ¦   «         Z+ G d„ de%¦  «        Z, G d„ de%¦  «        Z- G d„ de%¦  «        Z. e e/edd¦  «         d¦  «         G d„ de%¦  «        ¦   «         Z0 G d„ de%¦  «        Z1 G d„ de%¦  «        Z2 G d„ de%¦  «        Z3 G d„ d e¦  «        Z4 e ej5        e¦  «         d!¦  «         G d"„ d#e%¦  «        ¦   «         Z6 G d$„ d%e%¦  «        Z7 G d&„ d'e%¦  «        Z8 G d(„ d)ej9        ¦  «        Z: G d*„ d+ej9        ¦  «        Z; G d,„ d-e:¦  «        Z< G d.„ d/¦  «        Z= G d0„ d1¦  «        Z> G d2„ d3e%¦  «        Z? e e/ed4d¦  «         d5¦  «         G d6„ d7e%¦  «        ¦   «         Z@ eejA         d8¦  «         G d9„ d:e%¦  «        ¦   «         ZB G d;„ d<e%¦  «        ZC G d=„ d>e%¦  «        ZD G d?„ d@e%¦  «        ZE G dA„ dBe%¦  «        ZFdS )Cz#
Tests for L{twisted.python.util}.
é    N)ÚIterableÚMappingÚMutableMappingÚSequence)ÚskipIf)Úreactor)ÚDeferred)ÚProcessDone)ÚIReactorProcess)ÚProcessProtocol)Úutil)ÚFilePath)ÚMockOS)ÚFailTestÚTestCase)Úsuppressc                   ó‚   — e Zd Zd„ Zd„ Zd„ Z eedu d¦  «        d„ ¦   «         Zd„ Z	 ee
du d¦  «        d	„ ¦   «         ZdS )
Ú	UtilTestsc                 ób   — g d¢}|                       t          j        |¦  «        g d¢¦  «         d S )N)Úaé   Úabr   é   é   r   é   r   r   é   )r   r   r   r   r   r   r   )ÚassertEqualr   Úuniquify)ÚselfÚlistWithDupess     ú\/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/python/test/test_util.pyÚtestUniqzUtilTests.testUniq+   s:   € Ø@Ð@Ð@ˆØ×Ò�œ }Ñ5Ô5Ð7QÐ7QÐ7QÑRÔRÐRÐRÐRó    c                 óV  — |                       t          j        t          t          dd¦  «        ¦  «         |                      t          j        t          t          dd¦  «        ¦  «         	 t          j        t          t          dd¦  «         t          d¦  «        ‚# t          $ r Y d S w xY w)Nr   r   z,util.raises didn't raise when it should have)Ú
assertTruer   ÚraisesÚZeroDivisionErrorÚdivmodÚassertFalseÚ	TypeErrorr   ©r   s    r!   Ú
testRaiseszUtilTests.testRaises/   s›   € Ø�Š�œÕ$5µv¸qÀ!ÑDÔDÑEÔEÐEØ×Ò�œÕ%6½ÀÀ1ÑEÔEÑFÔFÐFð	KÝŒK�	¥6¨1¨aÑ0Ô0Ð0õ ÐIÑJÔJÐJøõ !ð 	ð 	ð 	ØˆDˆDð	øøøs   Á*!B Â
B(Â'B(c                 óV   — |                       t          j        d¦  «        d¦  «         dS )ú†
        When L{uidFromString} is called with a base-ten string representation
        of an integer, it returns the integer.
        Ú100éd   N)r   r   ÚuidFromStringr+   s    r!   Útest_uidFromNumericStringz#UtilTests.test_uidFromNumericString:   ó+   € ð
 	×Ò�Ô+¨EÑ2Ô2°CÑ8Ô8Ð8Ð8Ð8r#   Nz0Username/UID conversion requires the pwd module.c                 óÀ   — t                                t          j        ¦   «         ¦  «        }|                      t          j        |j        ¦  «        |j        ¦  «         dS )r.   N)	ÚpwdÚgetpwuidÚosÚgetuidr   r   r1   Úpw_nameÚpw_uid)r   Úpwents     r!   Útest_uidFromUsernameStringz$UtilTests.test_uidFromUsernameStringA   óF   € õ —’�RœY™[œ[Ñ)Ô)ˆØ×Ò�Ô+¨E¬MÑ:Ô:¸E¼LÑIÔIÐIÐIÐIr#   c                 óV   — |                       t          j        d¦  «        d¦  «         dS )ú†
        When L{gidFromString} is called with a base-ten string representation
        of an integer, it returns the integer.
        r/   r0   N)r   r   ÚgidFromStringr+   s    r!   Útest_gidFromNumericStringz#UtilTests.test_gidFromNumericStringJ   r3   r#   z2Group Name/GID conversion requires the grp module.c                 óÀ   — t                                t          j        ¦   «         ¦  «        }|                      t          j        |j        ¦  «        |j        ¦  «         dS )r?   N)	ÚgrpÚgetgrgidr7   Úgetgidr   r   r@   Úgr_nameÚgr_gid)r   Úgrents     r!   Útest_gidFromGroupnameStringz%UtilTests.test_gidFromGroupnameStringQ   r=   r#   )Ú__name__Ú
__module__Ú__qualname__r"   r,   r2   r   r5   r<   rA   rC   rI   © r#   r!   r   r   *   sº   € € € € € ðSð Sð Sð	Kð 	Kð 	Kð9ð 9ð 9ð €VˆC�4ˆKÐKÑLÔLðJð Jñ MÔLðJð9ð 9ð 9ð €VˆC�4ˆKÐMÑNÔNðJð Jñ OÔNðJð Jð Jr#   r   c                   ó   — e Zd ZdZd„ ZdS )ÚNameToLabelTestsz#
    Tests for L{nameToLabel}.
    c                 ó†   — g d¢}|D ]9\  }}t          j        |¦  «        }|                      ||d|›d|›d|›�¦  «         Œ:dS )zK
        Test the various kinds of inputs L{nameToLabel} supports.
        ))ÚfÚF)ÚfoÚFo)ÚfooÚFoo)ÚfooBarzFoo Bar)Ú	fooBarBazzFoo Bar BazznameToLabel(z) == z != N)r   ÚnameToLabelr   )r   ÚnameDataÚinpÚoutÚgots        r!   Útest_nameToLabelz!NameToLabelTests.test_nameToLabel`   sz   € ð
ð 
ð 
ˆð !ð 	Vð 	V‰HˆC�ÝÔ" 3Ñ'Ô'ˆCØ×Ò˜S #Ð'T°cÐ'TÐ'TÀ#Ð'TÐ'TÈSÐ'TÐ'TÑUÔUÐUÐUð	Vð 	Vr#   N)rJ   rK   rL   Ú__doc__r^   rM   r#   r!   rO   rO   [   s2   € € € € € ðð ðVð Vð Vð Vð Vr#   rO   c                   ó   — e Zd ZdZd„ ZdS )ÚUntilConcludesTestsz:
    Tests for L{untilConcludes}, an C{EINTR} helper.
    c                 óz  ‡ — ˆ fd„}dg‰ _         d‰ _        ‰                      t          j        |dd¦  «        d¦  «         ‰                      ‰ j        d¦  «         dt
          t          g‰ _         d‰ _        ‰                      t          j        |dd¦  «        d¦  «         ‰                      ‰ j        d¦  «         dS )a  
        L{untilConcludes} calls the function passed to it until the function
        does not raise either L{OSError} or L{IOError} with C{errno} of
        C{EINTR}.  It otherwise completes with the same result as the function
        passed to it.
        c                 ó�   •— ‰xj         dz  c_         ‰j                             ¦   «         }|� |t          j        d¦  «        ‚| |z   S )Nr   zInterrupted system call!)ÚcallsÚ
exceptionsÚpopÚerrnoÚEINTR)r   ÚbÚexcr   s      €r!   rQ   z3UntilConcludesTests.test_uninterruptably.<locals>.f}   sH   ø€ ØˆJŒJ˜!‰OˆJŒJØ”/×%Ò%Ñ'Ô'ˆCØˆØ�c�%œ+Ð'AÑBÔBÐBØ�q‘5ˆLr#   Nr   r   r   r   é   )re   rd   r   r   ÚuntilConcludesÚOSErrorÚIOError)r   rQ   s   ` r!   Útest_uninterruptablyz(UntilConcludesTests.test_uninterruptablyu   sÃ   ø€ ð	ð 	ð 	ð 	ð 	ð  ˜&ˆŒØˆŒ
Ø×Ò�Ô,¨Q°°1Ñ5Ô5°qÑ9Ô9Ð9Ø×Ò˜œ QÑ'Ô'Ð'à¥­'Ð2ˆŒØˆŒ
Ø×Ò�Ô,¨Q°°1Ñ5Ô5°qÑ9Ô9Ð9Ø×Ò˜œ QÑ'Ô'Ð'Ð'Ð'r#   N)rJ   rK   rL   r_   ro   rM   r#   r!   ra   ra   p   s-   € € € € € ðð ð(ð (ð (ð (ð (r#   ra   r8   zgetuid/setuid not availablec                   ó6   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	dS )	ÚSwitchUIDTestsz&
    Tests for L{util.switchUID}.
    c                 ó¾   — t          ¦   «         | _        |                      t          d| j        ¦  «         |                      t          d| j        ¦  «         g | _        d S )Nr7   Ú
initgroups)r   ÚmockosÚpatchr   rs   ÚinitgroupsCallsr+   s    r!   ÚsetUpzSwitchUIDTests.setUp•   sK   € Ý‘h”hˆŒØ�
Š
•4˜˜tœ{Ñ+Ô+Ð+Ø�
Š
•4˜ t¤Ñ7Ô7Ð7Ø!ˆÔÐÐr#   c                 ó>   — | j                              ||f¦  «         dS )zK
        Save L{util.initgroups} calls in C{self.initgroupsCalls}.
        N)rv   Úappend)r   ÚuidÚgids      r!   rs   zSwitchUIDTests.initgroups›   s%   € ð 	Ô×#Ò# S¨# JÑ/Ô/Ð/Ð/Ð/r#   c                 óª   — t          j        dd¦  «         |                      | j        dg¦  «         |                      | j        j        dg¦  «         dS )zn
        L{util.switchUID} calls L{util.initgroups} and then C{os.setuid} with
        the given uid.
        éà.  N©r}   N)Úsetuidr}   )r   Ú	switchUIDr   rv   rt   Úactionsr+   s    r!   Útest_uidzSwitchUIDTests.test_uid¡   sV   € õ
 	Œ�u˜dÑ#Ô#Ð#Ø×Ò˜Ô-°¨Ñ?Ô?Ð?Ø×Ò˜œÔ,Ð/@Ð.AÑBÔBÐBÐBÐBr#   c                 ó¬   — t          j        ddd¦  «         |                      | j        dg¦  «         |                      | j        j        dg¦  «         dS )zš
        L{util.switchUID} calls L{util.initgroups} and then C{os.seteuid} with
        the given uid if the C{euid} parameter is set to C{True}.
        r}   NTr~   )r   r€   r   rv   rt   ÚseteuidCallsr+   s    r!   Ú	test_euidzSwitchUIDTests.test_euidª   sV   € õ
 	Œ�u˜d DÑ)Ô)Ð)Ø×Ò˜Ô-°¨Ñ?Ô?Ð?Ø×Ò˜œÔ1°E°7Ñ;Ô;Ð;Ð;Ð;r#   c                 óò  — | j                              ¦   «         }t          j        |d¦  «         |                      | j        g ¦  «         |                      | j         j        g ¦  «         |                      t          j        g¦  «        }|                      t          |¦  «        d¦  «         |  	                    d|z  |d         d         ¦  «         |  	                    d|z  |d         d         ¦  «         dS )zž
        If the current uid is the same as the uid passed to L{util.switchUID},
        then initgroups does not get called, but a warning is issued.
        Nr   z&tried to drop privileges and setuid %ir   Úmessagezbut uid is already %i)
rt   r8   r   r€   r   rv   r�   ÚflushWarningsÚlenÚassertIn)r   rz   ÚcurrentWarningss      r!   Útest_currentUIDzSwitchUIDTests.test_currentUID³   sê   € ð
 Œk× Ò Ñ"Ô"ˆÝŒ�s˜DÑ!Ô!Ð!Ø×Ò˜Ô-¨rÑ2Ô2Ð2Ø×Ò˜œÔ,¨bÑ1Ô1Ð1Ø×,Ò,­d¬nÐ-=Ñ>Ô>ˆØ×Ò�˜_Ñ-Ô-¨qÑ1Ô1Ð1Ø�ŠØ4°sÑ:Ø˜AÔ˜yÔ)ñ	
ô 	
ð 	
ð 	�ŠÐ-°Ñ3°_ÀQÔ5GÈ	Ô5RÑSÔSÐSÐSÐSr#   c                 óô  — | j                              ¦   «         }t          j        |dd¦  «         |                      | j        g ¦  «         |                      | j         j        g ¦  «         |                      t          j        g¦  «        }|                      t          |¦  «        d¦  «         |  	                    d|z  |d         d         ¦  «         |  	                    d|z  |d         d         ¦  «         dS )z 
        If the current euid is the same as the euid passed to L{util.switchUID},
        then initgroups does not get called, but a warning is issued.
        NTr   z'tried to drop privileges and seteuid %ir   r‡   zbut euid is already %i)
rt   Úgeteuidr   r€   r   rv   r„   rˆ   r‰   rŠ   )r   Úeuidr‹   s      r!   Útest_currentEUIDzSwitchUIDTests.test_currentEUIDÄ   sì   € ð
 Œ{×"Ò"Ñ$Ô$ˆÝŒ�t˜T 4Ñ(Ô(Ð(Ø×Ò˜Ô-¨rÑ2Ô2Ð2Ø×Ò˜œÔ1°2Ñ6Ô6Ð6Ø×,Ò,­d¬nÐ-=Ñ>Ô>ˆØ×Ò�˜_Ñ-Ô-¨qÑ1Ô1Ð1Ø�ŠØ5¸Ñ<Ø˜AÔ˜yÔ)ñ	
ô 	
ð 	
ð 	�ŠÐ.°Ñ5°ÀqÔ7IÈ)Ô7TÑUÔUÐUÐUÐUr#   N)
rJ   rK   rL   r_   rw   rs   r‚   r…   rŒ   r�   rM   r#   r!   rq   rq   �   sƒ   € € € € € ðð ð"ð "ð "ð0ð 0ð 0ðCð Cð Cð<ð <ð <ðTð Tð Tð"Vð Vð Vð Vð Vr#   rq   c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚMergeFunctionMetadataTestsz-
    Tests for L{mergeFunctionMetadata}.
    c                 óÈ   ‡‡— t          ¦   «         Št          ¦   «         Šˆfd„}d	ˆfd„	}t          j        ||¦  «        }|                       |dddd¬¦  «        ‰¦  «         dS )
zt
        After merging C{foo}'s data into C{bar}, the returned function behaves
        as if it is C{bar}.
        c                  ó   •— ‰ S ©NrM   )Ú
foo_objects   €r!   rU   zQMergeFunctionMetadataTests.test_mergedFunctionBehavesLikeMergeTarget.<locals>.fooã   s	   ø€ ØÐr#   é
   c                 ó   •— |\  }}‰S r•   rM   )	ÚxÚyr   ÚcÚdÚer   ri   Ú
bar_objects	           €r!   ÚbarzQMergeFunctionMetadataTests.test_mergedFunctionBehavesLikeMergeTarget.<locals>.baræ   s   ø€ Ø‰FˆQ�ØÐr#   r   r   )r   r   )ÚquuxN)r—   )Úobjectr   ÚmergeFunctionMetadataÚassertIs)r   rU   rŸ   Úbazrž   r–   s       @@r!   Ú)test_mergedFunctionBehavesLikeMergeTargetzDMergeFunctionMetadataTests.test_mergedFunctionBehavesLikeMergeTargetÛ   s�   øø€ õ
 ‘X”Xˆ
Ý‘X”Xˆ
ð	ð 	ð 	ð 	ð 	ð	ð 	ð 	ð 	ð 	ð 	õ Ô(¨¨cÑ2Ô2ˆØ�Š�c�c˜!˜Q ¨RÐ0Ñ0Ô0°*Ñ=Ô=Ð=Ð=Ð=r#   c                 óŠ   — d„ }d„ }d|_         t          j        ||¦  «        }|                      |j         |j         ¦  «         dS )zd
        Merging C{foo} into C{bar} returns a function with C{foo}'s
        C{__module__}.
        c                  ó   — d S r•   rM   rM   r#   r!   rU   z;MergeFunctionMetadataTests.test_moduleIsMerged.<locals>.fooó   ó   € ØˆDr#   c                  ó   — d S r•   rM   rM   r#   r!   rŸ   z;MergeFunctionMetadataTests.test_moduleIsMerged.<locals>.barö   r¨   r#   zsomewhere.elseN)rK   r   r¢   r   ©r   rU   rŸ   r¤   s       r!   Útest_moduleIsMergedz.MergeFunctionMetadataTests.test_moduleIsMergedí   s[   € ð	ð 	ð 	ð	ð 	ð 	ð *ˆŒåÔ(¨¨cÑ2Ô2ˆØ×Ò˜œ¨¬Ñ8Ô8Ð8Ð8Ð8r#   c                 ó|   — d„ }d„ }t          j        ||¦  «        }|                      |j        |j        ¦  «         dS )zX
        Merging C{foo} into C{bar} returns a function with C{foo}'s docstring.
        c                  ó   — dS )z&
            This is foo.
            NrM   rM   r#   r!   rU   z>MergeFunctionMetadataTests.test_docstringIsMerged.<locals>.foo  ó   € € € r#   c                  ó   — dS )z&
            This is bar.
            NrM   rM   r#   r!   rŸ   z>MergeFunctionMetadataTests.test_docstringIsMerged.<locals>.bar  r®   r#   N)r   r¢   r   r_   rª   s       r!   Útest_docstringIsMergedz1MergeFunctionMetadataTests.test_docstringIsMergedþ   sT   € ð
	ð 	ð 	ð
	ð 	ð 	õ
 Ô(¨¨cÑ2Ô2ˆØ×Ò˜œ c¤kÑ2Ô2Ð2Ð2Ð2r#   c                 ó|   — d„ }d„ }t          j        ||¦  «        }|                      |j        |j        ¦  «         dS )zS
        Merging C{foo} into C{bar} returns a function with C{foo}'s name.
        c                  ó   — d S r•   rM   rM   r#   r!   rU   z9MergeFunctionMetadataTests.test_nameIsMerged.<locals>.foo  r¨   r#   c                  ó   — d S r•   rM   rM   r#   r!   rŸ   z9MergeFunctionMetadataTests.test_nameIsMerged.<locals>.bar  r¨   r#   N)r   r¢   r   rJ   rª   s       r!   Útest_nameIsMergedz,MergeFunctionMetadataTests.test_nameIsMerged  sT   € ð
	ð 	ð 	ð	ð 	ð 	õ Ô(¨¨cÑ2Ô2ˆØ×Ò˜œ s¤|Ñ4Ô4Ð4Ð4Ð4r#   c                 ó4  — d„ }d|_         d|_        d„ }d|_        d|_        t          j        ||¦  «        }|                      |j         |j         ¦  «         |                      |j        |j        ¦  «         |                      |j        |j        ¦  «         dS )zv
        Merging C{foo} into C{bar} returns a function with C{bar}'s
        dictionary, updated by C{foo}'s.
        c                  ó   — d S r•   rM   rM   r#   r!   rU   zGMergeFunctionMetadataTests.test_instanceDictionaryIsMerged.<locals>.foo$  r¨   r#   r   r   c                  ó   — d S r•   rM   rM   r#   r!   rŸ   zGMergeFunctionMetadataTests.test_instanceDictionaryIsMerged.<locals>.bar*  r¨   r#   r   r   N)r   ri   r›   r   r¢   r   rª   s       r!   Útest_instanceDictionaryIsMergedz:MergeFunctionMetadataTests.test_instanceDictionaryIsMerged  s¦   € ð	ð 	ð 	ð ˆŒØˆŒð	ð 	ð 	ð ˆŒØˆŒåÔ(¨¨cÑ2Ô2ˆØ×Ò˜œ ¤Ñ&Ô&Ð&Ø×Ò˜œ ¤Ñ&Ô&Ð&Ø×Ò˜œ ¤Ñ&Ô&Ð&Ð&Ð&r#   N)	rJ   rK   rL   r_   r¥   r«   r°   r´   r¸   rM   r#   r!   r’   r’   Ö   si   € € € € € ðð ð>ð >ð >ð$9ð 9ð 9ð"3ð 3ð 3ð$5ð 5ð 5ð'ð 'ð 'ð 'ð 'r#   r’   c                   ó   — e Zd ZdZd„ ZdS )ÚOrderedDictTestsz(
    Tests for L{util.OrderedDict}.
    c                 ó&  — ddl m} | |                      | j        g¬¦  «        }|                      |d         d         d¦  «         |                      |d         d         t
          ¦  «         |                      t          |¦  «        d¦  «         dS )	z4
        L{util.OrderedDict} is deprecated.
        r   )ÚOrderedDict©ÚoffendingFunctionsr‡   zftwisted.python.util.OrderedDict was deprecated in Twisted 15.5.0: Use collections.OrderedDict instead.Úcategoryr   N)Útwisted.python.utilr¼   rˆ   Útest_deprecatedr   ÚDeprecationWarningr‰   )r   r¼   r‹   s      r!   rÁ   z OrderedDictTests.test_deprecated;  s¨   € ð 	4Ð3Ð3Ð3Ð3Ð3àˆà×,Ò,ÀÔAUÐ@VÐ,ÑWÔWˆØ×ÒØ˜AÔ˜yÔ)ð;ñ	
ô 	
ð 	
ð
 	×Ò˜¨Ô+¨JÔ7Õ9KÑLÔLÐLØ×Ò�˜_Ñ-Ô-¨qÑ1Ô1Ð1Ð1Ð1r#   N)rJ   rK   rL   r_   rÁ   rM   r#   r!   rº   rº   6  s-   € € € € € ðð ð2ð 2ð 2ð 2ð 2r#   rº   c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚInsensitiveDictTestsz,
    Tests for L{util.InsensitiveDict}.
    c                 ól  — t          j        ¦   «         }|                      t          |t          ¦  «        ¦  «         |                      t          |t
          ¦  «        ¦  «         |                      t          |t          ¦  «        ¦  «         |                      t          |t          ¦  «        ¦  «         dS )zN
        L{util.InsensitiveDict} implements L{typing.MutableMapping}.
        N)	r   ÚInsensitiveDictr%   Ú
isinstancer   r   r   r)   r   )r   Údcts     r!   Útest_abczInsensitiveDictTests.test_abcR  sŠ   € õ Ô"Ñ$Ô$ˆØ�Š�
 3­Ñ1Ô1Ñ2Ô2Ð2Ø�Š�
 3­Ñ0Ô0Ñ1Ô1Ð1Ø�Š�
 3­Ñ7Ô7Ñ8Ô8Ð8Ø×Ò� C­Ñ2Ô2Ñ3Ô3Ð3Ð3Ð3r#   c                 ó¸  — t          j        ddddidœd¬¦  «        }|                      |d         ddi¦  «         |                      |d         d¦  «         |                      |                     ¦   «         |¦  «         |                      |d         |                     d¦  «        ¦  «         |                      d|¦  «         |                      d|¦  «         t          t          |¦  «        |t           j        d	œ¦  «        }|                      ||¦  «         g d
¢}|D ]Z}|                      ||                     ¦   «         ¦  «         |                      |||         f| 	                    ¦   «         ¦  «         Œ[|                      t          |¦  «        t          |¦  «        ¦  «         |d= |d= |                      |                     ¦   «         dg¦  «         dS )zr
        L{util.InsensitiveDict} preserves the case of keys if constructed with
        C{preserve=True}.
        rŸ   r   r   ©rV   r   Úfnz©ÚpreserverÌ   rU   rV   )rÈ   rÆ   )rV   rÌ   r   N)r   rÆ   r   ÚcopyÚgetrŠ   ÚevalÚreprÚkeysÚitemsr‰   )r   rÈ   ÚresultrÓ   r™   s        r!   Útest_preservez"InsensitiveDictTests.test_preserve\  sÀ  € õ
 Ô"¨5°QÀÀ1¸vÐ#FÐ#FÐQRÐSÑSÔSˆØ×Ò˜˜Uœ a¨ VÑ,Ô,Ð,Ø×Ò˜˜Uœ UÑ+Ô+Ð+Ø×Ò˜Ÿš™œ SÑ)Ô)Ð)Ø×Ò˜˜Uœ S§W¢W¨U¡^¤^Ñ4Ô4Ð4Ø�Š�a˜ÑÔÐØ�Š�e˜SÑ!Ô!Ð!åÝ�‰IŒIàÝ#'Ô#7ðð ñ
ô 
ˆð 	×Ò˜ Ñ%Ô%Ð%à Ð Ð ˆØð 	4ð 	4ˆAØ�MŠM˜!˜SŸXšX™ZœZÑ(Ô(Ð(Ø�MŠM˜1˜c !œf˜+ s§y¢y¡{¤{Ñ3Ô3Ð3Ð3Ø×Ò�˜T™œ¥C¨¡H¤HÑ-Ô-Ð-Ø�ˆFØ�ˆJØ×Ò˜Ÿš™œ e WÑ-Ô-Ð-Ð-Ð-r#   c                 ó¾  — t          j        ddddidœd¬¦  «        }g d¢}|D ]Z}|                      ||                     ¦   «         ¦  «         |                      |||         f|                     ¦   «         ¦  «         Œ[|                      t          |¦  «        t          |¦  «        ¦  «         |d= |d= |                      |                     ¦   «         d	g¦  «         d
S )z|
        L{util.InsensitiveDict} does not preserves the case of keys if
        constructed with C{preserve=False}.
        rŸ   r   r   rË   r   rÍ   )rU   rÌ   r   rU   rÌ   N)r   rÆ   rŠ   rÓ   rÔ   r   r‰   )r   rÈ   rÓ   r™   s       r!   Útest_noPreservez$InsensitiveDictTests.test_noPreserve{  sÛ   € õ
 Ô"¨5°QÀÀ1¸vÐ#FÐ#FÐQRÐSÑSÔSˆØ Ð Ð ˆØð 	4ð 	4ˆAØ�MŠM˜!˜SŸXšX™ZœZÑ(Ô(Ð(Ø�MŠM˜1˜c !œf˜+ s§y¢y¡{¤{Ñ3Ô3Ð3Ð3Ø×Ò�˜T™œ¥C¨¡H¤HÑ-Ô-Ð-Ø�ˆFØ�ˆJØ×Ò˜Ÿš™œ e WÑ-Ô-Ð-Ð-Ð-r#   c                 óÄ   — t          j        d¬¦  «        }d|d<   |                      |d         d¦  «         |                      |                     ¦   «         dg¦  «         dS )z4
        Unicode keys are case insensitive.
        FrÍ   r   rV   ÚFOOrU   N©r   rÆ   r   rÓ   ©r   rœ   s     r!   Útest_unicodez!InsensitiveDictTests.test_unicodeŠ  s`   € õ Ô ¨%Ð0Ñ0Ô0ˆØˆˆ%‰Ø×Ò˜˜5œ 1Ñ%Ô%Ð%Ø×Ò˜Ÿš™œ E 7Ñ+Ô+Ð+Ð+Ð+r#   c                 óÄ   — t          j        d¬¦  «        }d|d<   |                      |d         d¦  «         |                      |                     ¦   «         dg¦  «         dS )z2
        Bytes keys are case insensitive.
        FrÍ   r   s   Foos   FOOs   fooNrÛ   rÜ   s     r!   Ú
test_byteszInsensitiveDictTests.test_bytes“  s`   € õ Ô ¨%Ð0Ñ0Ô0ˆØˆˆ&‰	Ø×Ò˜˜6œ AÑ&Ô&Ð&Ø×Ò˜Ÿš™œ F 8Ñ,Ô,Ð,Ð,Ð,r#   N)	rJ   rK   rL   r_   rÉ   rÖ   rØ   rÝ   rß   rM   r#   r!   rÄ   rÄ   M  si   € € € € € ðð ð4ð 4ð 4ð.ð .ð .ð>.ð .ð .ð,ð ,ð ,ð-ð -ð -ð -ð -r#   rÄ   c                   ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )ÚPasswordTestingProcessProtocolz’
    Write the string C{"secret\n"} to a subprocess and then collect all of
    its output and fire a Deferred with it when the process ends.
    c                 óH   — g | _         | j                             d¦  «         d S )Ns   secret
)ÚoutputÚ	transportÚwriter+   s    r!   ÚconnectionMadez-PasswordTestingProcessProtocol.connectionMade£  s%   € ØˆŒØŒ×Ò˜[Ñ)Ô)Ð)Ð)Ð)r#   c                 ó>   — | j                              ||f¦  «         d S r•   )rã   ry   )r   Úfdrã   s      r!   ÚchildDataReceivedz0PasswordTestingProcessProtocol.childDataReceived§  s"   € ØŒ×Ò˜B ˜<Ñ(Ô(Ð(Ð(Ð(r#   c                 óH   — | j                              || j        f¦  «         d S r•   )ÚfinishedÚcallbackrã   )r   Úreasons     r!   ÚprocessEndedz+PasswordTestingProcessProtocol.processEndedª  s%   € ØŒ×Ò ¨¬Ð4Ñ5Ô5Ð5Ð5Ð5r#   N)rJ   rK   rL   r_   ræ   ré   rî   rM   r#   r!   rá   rá   �  sK   € € € € € ðð ð
*ð *ð *ð)ð )ð )ð6ð 6ð 6ð 6ð 6r#   rá   z,Process support required to test getPasswordc                   ó   — e Zd Zd„ ZdS )ÚGetPasswordTestsc           	      óF  ‡ — t          ¦   «         }t          ¦   «         |_        t          j        |t
          t
          ddgdt          j                             t          j
        ¦  «                             d¦  «        i¬¦  «         ˆ fd„}|j                             |¦  «        S )a.  
        Making sure getPassword accepts a password from standard input by
        running a child process which uses getPassword to read in a string
        which it then writes it out again.  Write a string to the child
        process and then read one and make sure it is the right string.
        s   -csj   import sys
from twisted.python.util import getPassword
sys.stdout.write(getPassword())
sys.stdout.flush()
s
   PYTHONPATHÚutf8)Úenvc                 ór   •— | \  }}|                      t          ¦  «         ‰                     d|¦  «         d S )N)r   s   secret)Útrapr
   rŠ   )rÕ   rí   rã   r   s      €r!   ÚprocessFinishedz4GetPasswordTests.test_stdin.<locals>.processFinishedÌ  s9   ø€ Ø%ÑˆV�VØ�KŠK�Ñ$Ô$Ð$Ø�MŠM˜.¨&Ñ1Ô1Ð1Ð1Ð1r#   )rá   r	   rë   r   ÚspawnProcessÚpyExer7   ÚpathsepÚjoinÚsysÚpathÚencodeÚaddCallback)r   Úprö   s   `  r!   Ú
test_stdinzGetPasswordTests.test_stdin³  s¤   ø€ õ +Ñ,Ô,ˆÝ‘Z”ZˆŒ
ÝÔØÝåØð,ð		ð ¥¤
§¢µ´Ñ 9Ô 9× @Ò @ÀÑ HÔ HÐIð	
ñ 	
ô 	
ð 	
ð 	2ð 	2ð 	2ð 	2ð 	2ð
 Œz×%Ò% oÑ6Ô6Ð6r#   N)rJ   rK   rL   r   rM   r#   r!   rð   rð   ®  s#   € € € € € ð
7ð 7ð 7ð 7ð 7r#   rð   c                   ó   — e Zd Zd„ ZdS )ÚSearchUpwardsTestsc                 óÞ  — t          j        d¦  «         t          dd¦  «                             ¦   «          t          dd¦  «                             ¦   «          t          dd¦  «                             ¦   «          t          j        d¦  «         t          j        d¦  «         t          j        d¦  «         t          j        d	¦  «         t          j        dd
gddg¬¦  «        }t           j                             d¦  «        t           j	        z   }|  
                    ||¦  «         t          j        d¦  «         t          j        dd
gddg¬¦  «        }d }|  
                    ||¦  «         d S )Nzsearchupwards/a/b/czsearchupwards/foo.txtÚwzsearchupwards/a/foo.txtzsearchupwards/a/b/c/foo.txtzsearchupwards/barzsearchupwards/bamzsearchupwards/a/barzsearchupwards/a/b/bamzfoo.txtrŸ   Úbam)ÚfilesÚdirsÚsearchupwards)r7   ÚmakedirsÚopenÚcloseÚmkdirr   r  rü   ÚabspathÚsepr   ÚshutilÚrmtree)r   ÚactualÚexpecteds      r!   ÚtestSearchupwardsz$SearchUpwardsTests.testSearchupwardsÕ  s[  € Ý
ŒÐ)Ñ*Ô*Ð*ÝÐ$ cÑ*Ô*×0Ò0Ñ2Ô2Ð2ÝÐ&¨Ñ,Ô,×2Ò2Ñ4Ô4Ð4ÝÐ*¨CÑ0Ô0×6Ò6Ñ8Ô8Ð8Ý
ŒÐ$Ñ%Ô%Ð%Ý
ŒÐ$Ñ%Ô%Ð%Ý
ŒÐ&Ñ'Ô'Ð'Ý
ŒÐ(Ñ)Ô)Ð)ÝÔ#Ø!¨)¨¸EÀ5¸>ð
ñ 
ô 
ˆõ ”7—?’? ?Ñ3Ô3µb´fÑ<ˆØ×Ò˜ Ñ*Ô*Ð*ÝŒ�oÑ&Ô&Ð&ÝÔ#Ø!¨)¨¸EÀ5¸>ð
ñ 
ô 
ˆð ˆØ×Ò˜ Ñ*Ô*Ð*Ð*Ð*r#   N)rJ   rK   rL   r  rM   r#   r!   r  r  Ô  s#   € € € € € ð+ð +ð +ð +ð +r#   r  c                   ó2   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚIntervalDifferentialTestsc                 ó´   — t          t          j        g d¦  «        ¦  «        }t          d¦  «        D ]%}|                      t          |¦  «        d¦  «         Œ&d S )Nr—   r0   ©r—   N©Úiterr   ÚIntervalDifferentialÚranger   Únext©r   rœ   Úis      r!   ÚtestDefaultz%IntervalDifferentialTests.testDefaultì  sZ   € Ý•Ô*¨2¨rÑ2Ô2Ñ3Ô3ˆÝ�s‘”ð 	2ð 	2ˆAØ×Ò�T !™WœW jÑ1Ô1Ð1Ð1ð	2ð 	2r#   c                 ó¶   — t          t          j        dgd¦  «        ¦  «        }t          d¦  «        D ]%}|                      t          |¦  «        d¦  «         Œ&d S )Nrk   r—   r0   ©rk   r   r  r  s      r!   Ú
testSinglez$IntervalDifferentialTests.testSingleñ  s\   € Ý•Ô*¨A¨3°Ñ3Ô3Ñ4Ô4ˆÝ�s‘”ð 	.ð 	.ˆAØ×Ò�T !™WœW fÑ-Ô-Ð-Ð-ð	.ð 	.r#   c                 ó¾  — t          t          j        ddgd¦  «        ¦  «        }t          d¦  «        D �]§}|                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d	¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d
¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         �Œ©d S )Nrk   é   r—   r0   r!  ©r   r   ©r   r   )r   r   ©r   r   ©r   r   ©r   r   )r   r   ©r   r   ©r   r   r  r  s      r!   ÚtestPairz"IntervalDifferentialTests.testPairö  s’  € Ý•Ô*¨A¨q¨6°2Ñ6Ô6Ñ7Ô7ˆÝ�s‘”ð 	.ñ 	.ˆAØ×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ñ-ð	.ð 	.r#   c                 ó¨  — t          t          j        g d¢d¦  «        ¦  «        }t          d¦  «        D �]œ}|                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         |                      t          |¦  «        d¦  «         �Œžd S )	N)r   r   rk   r—   r0   r*  r+  )r   r   r'  )r   r   r  r  s      r!   Ú
testTriplez$IntervalDifferentialTests.testTriple  sV  € Ý•Ô*¨9¨9¨9°bÑ9Ô9Ñ:Ô:ˆÝ�s‘”ð 	.ñ 	.ˆAØ×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ø×Ò�T !™WœW fÑ-Ô-Ð-Ñ-ð'	.ð 	.r#   c                 ó  — t          t          j        g d¦  «        ¦  «        }|                      t	          |¦  «        d¦  «         |                     d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                     d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         d S )Nr—   r  r   r&  r   r+  )r  r   r  r   r  ÚaddIntervalrÜ   s     r!   Ú
testInsertz$IntervalDifferentialTests.testInsert  sB  € Ý•Ô*¨2¨rÑ2Ô2Ñ3Ô3ˆØ×Ò�˜a™œ *Ñ-Ô-Ð-Ø	�Š�aÑÔÐØ×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø	�Š�aÑÔÐØ×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ð)Ð)r#   c                 óˆ  — t          t          j        ddgd¦  «        ¦  «        }|                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                     d¦  «         |                      t	          |¦  «        d¦  «         |                      t	          |¦  «        d¦  «         |                     d¦  «         |                      t	          |¦  «        d	¦  «         |                      t          |j        d¦  «         d S )
Nr   rk   r—   r&  r%  r'  r)  r!  r  )r  r   r  r   r  ÚremoveIntervalÚassertRaisesÚ
ValueErrorrÜ   s     r!   Ú
testRemovez$IntervalDifferentialTests.testRemove+  s  € Ý•Ô*¨A¨q¨6°2Ñ6Ô6Ñ7Ô7ˆØ×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø	×Ò˜ÑÔÐØ×Ò�˜a™œ &Ñ)Ô)Ð)Ø×Ò�˜a™œ &Ñ)Ô)Ð)Ø	×Ò˜ÑÔÐØ×Ò�˜a™œ *Ñ-Ô-Ð-Ø×Ò�* aÔ&6¸Ñ;Ô;Ð;Ð;Ð;r#   N)	rJ   rK   rL   r  r"  r,  r.  r1  r6  rM   r#   r!   r  r  ë  sn   € € € € € ð2ð 2ð 2ð
.ð .ð .ð
.ð .ð .ð .ð .ð .ð.*ð *ð *ð
<ð 
<ð 
<ð 
<ð 
<r#   r  c                   ó   — e Zd ZdZdZd„ ZdS )ÚRecordz8
    Trivial user of L{FancyEqMixin} used by tests.
    ©r   ri   c                 ó"   — || _         || _        d S r•   r9  ©r   r   ri   s      r!   Ú__init__zRecord.__init__?  ó   € ØˆŒØˆŒˆˆr#   N©rJ   rK   rL   r_   ÚcompareAttributesr<  rM   r#   r!   r8  r8  8  ó5   € € € € € ðð ð #Ððð ð ð ð r#   r8  c                   ó   — e Zd ZdZdZd„ ZdS )ÚDifferentRecordzL
    Trivial user of L{FancyEqMixin} which is not related to L{Record}.
    r9  c                 ó"   — || _         || _        d S r•   r9  r;  s      r!   r<  zDifferentRecord.__init__K  r=  r#   Nr>  rM   r#   r!   rB  rB  D  r@  r#   rB  c                   ó   — e Zd ZdZdS )ÚDerivedRecordz@
    A class with an inheritance relationship to L{Record}.
    N)rJ   rK   rL   r_   rM   r#   r!   rE  rE  P  s   € € € € € ðð ð ð r#   rE  c                   ó"   — e Zd ZdZdedefd„ZdS )ÚEqualToEverythingzQ
    A class the instances of which consider themselves equal to everything.
    ÚotherÚreturnc                 ó   — dS )NTrM   ©r   rH  s     r!   Ú__eq__zEqualToEverything.__eq__[  s   € Øˆtr#   N©rJ   rK   rL   r_   r¡   ÚboolrL  rM   r#   r!   rG  rG  V  s@   € € € € € ðð ð˜Fð  tð ð ð ð ð ð r#   rG  c                   ó"   — e Zd ZdZdedefd„ZdS )ÚEqualToNothingzN
    A class the instances of which consider themselves equal to nothing.
    rH  rI  c                 ó   — dS )NFrM   rK  s     r!   rL  zEqualToNothing.__eq__d  s   € Øˆur#   NrM  rM   r#   r!   rP  rP  _  s@   € € € € € ðð ð˜Fð  tð ð ð ð ð ð r#   rP  c                   óH   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ ZdS )ÚEqualityTestsz$
    Tests for L{FancyEqMixin}.
    c                 óR  —  G d„ dt           j        ¦  «        }|                       |¦   «          |¦   «         k    ¦  «         |                       |¦   «          |¦   «         k    ¦  «          |¦   «         }|                      ||k    ¦  «         |                      ||k    ¦  «         dS )z�
        Instances of a class which mixes in L{FancyEqMixin} but which
        defines no comparison attributes compare by identity.
        c                   ó   — e Zd ZdS )ú*EqualityTests.test_identity.<locals>.EmptyN)rJ   rK   rL   rM   r#   r!   ÚEmptyrV  s  s   € € € € € ØˆDr#   rW  N)r   ÚFancyEqMixinr)   r%   )r   rW  Úemptys      r!   Útest_identityzEqualityTests.test_identitym  s¸   € ð	ð 	ð 	ð 	ð 	•DÔ%ñ 	ô 	ð 	ð 	×Ò˜˜™œ E E¡G¤GÒ+Ñ,Ô,Ð,Ø�Š˜˜™œ 5 5¡7¤7Ò*Ñ+Ô+Ð+Ø�‘”ˆØ�Š˜ šÑ'Ô'Ð'Ø×Ò˜ %šÑ(Ô(Ð(Ð(Ð(r#   c                 ó®  — |                       t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         dS )zä
        Instances of a class which mixes in L{FancyEqMixin} should compare
        equal if all of their attributes compare equal.  They should not
        compare equal if any of their attributes do not compare equal.
        r   r   r   r   N)r%   r8  r)   r+   s    r!   Útest_equalityzEqualityTests.test_equality|  s¬   € ð 	�Š�˜q !™œ­¨q°!©¬Ò4Ñ5Ô5Ð5Ø×Ò�  1™œ­°°1©¬Ò5Ñ6Ô6Ð6Ø×Ò�  1™œ­°°1©¬Ò5Ñ6Ô6Ð6Ø×Ò�  1™œ­°°1©¬Ò5Ñ6Ô6Ð6Ð6Ð6r#   c                 ó®  — |                       t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         dS )z
        Inequality between instances of a particular L{record} should be
        defined as the negation of equality.
        r   r   r   r   N)r)   r8  r%   r+   s    r!   Útest_unequalityzEqualityTests.test_unequality‡  s¨   € ð
 	×Ò�  1™œ­°°1©¬Ò5Ñ6Ô6Ð6Ø�Š�˜q !™œ­¨q°!©¬Ò4Ñ5Ô5Ð5Ø�Š�˜q !™œ­¨q°!©¬Ò4Ñ5Ô5Ð5Ø�Š�˜q !™œ­¨q°!©¬Ò4Ñ5Ô5Ð5Ð5Ð5r#   c                 óp   — |                       t          dd¦  «        t          dd¦  «        k    ¦  «         dS )zo
        Instances of different classes which mix in L{FancyEqMixin} should not
        compare equal.
        r   r   N)r)   r8  rB  r+   s    r!   Útest_differentClassesEqualityz+EqualityTests.test_differentClassesEquality‘  s5   € ð
 	×Ò�  1™œ­¸¸AÑ)>Ô)>Ò>Ñ?Ô?Ð?Ð?Ð?r#   c                 óp   — |                       t          dd¦  «        t          dd¦  «        k    ¦  «         dS )zm
        Instances of different classes which mix in L{FancyEqMixin} should
        compare unequal.
        r   r   N)r%   r8  rB  r+   s    r!   Útest_differentClassesInequalityz-EqualityTests.test_differentClassesInequality˜  s3   € ð
 	�Š�˜q !™œ­¸¸1Ñ(=Ô(=Ò=Ñ>Ô>Ð>Ð>Ð>r#   c                 ó®  — |                       t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         dS )zÞ
        An instance of a class which derives from a class which mixes in
        L{FancyEqMixin} should compare equal to an instance of the base class
        if and only if all of their attributes compare equal.
        r   r   r   r   N)r%   r8  rE  r)   r+   s    r!   Útest_inheritedClassesEqualityz+EqualityTests.test_inheritedClassesEqualityŸ  s´   € ð 	�Š�˜q !™œ­°a¸Ñ(;Ô(;Ò;Ñ<Ô<Ð<Ø×Ò�  1™œ­°q¸!Ñ)<Ô)<Ò<Ñ=Ô=Ð=Ø×Ò�  1™œ­°q¸!Ñ)<Ô)<Ò<Ñ=Ô=Ð=Ø×Ò�  1™œ­°q¸!Ñ)<Ô)<Ò<Ñ=Ô=Ð=Ð=Ð=r#   c                 ó®  — |                       t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         |                      t          dd¦  «        t          dd¦  «        k    ¦  «         dS )zÖ
        An instance of a class which derives from a class which mixes in
        L{FancyEqMixin} should compare unequal to an instance of the base
        class if any of their attributes compare unequal.
        r   r   r   r   N)r)   r8  rE  r%   r+   s    r!   Útest_inheritedClassesInequalityz-EqualityTests.test_inheritedClassesInequalityª  s°   € ð 	×Ò�  1™œ­°q¸!Ñ)<Ô)<Ò<Ñ=Ô=Ð=Ø�Š�˜q !™œ­°a¸Ñ(;Ô(;Ò;Ñ<Ô<Ð<Ø�Š�˜q !™œ­°a¸Ñ(;Ô(;Ò;Ñ<Ô<Ð<Ø�Š�˜q !™œ­°a¸Ñ(;Ô(;Ò;Ñ<Ô<Ð<Ð<Ð<r#   c                 óÒ   — |                       t          dd¦  «        t          ¦   «         k    ¦  «         |                      t          dd¦  «        t	          ¦   «         k    ¦  «         dS )zï
        The right-hand argument to the equality operator is given a chance
        to determine the result of the operation if it is of a type
        unrelated to the L{FancyEqMixin}-based instance on the left-hand
        side.
        r   r   N)r%   r8  rG  r)   rP  r+   s    r!   Ú(test_rightHandArgumentImplementsEqualityz6EqualityTests.test_rightHandArgumentImplementsEqualityµ  sW   € ð 	�Š�˜q !™œÕ(9Ñ(;Ô(;Ò;Ñ<Ô<Ð<Ø×Ò�  1™œ­Ñ)9Ô)9Ò9Ñ:Ô:Ð:Ð:Ð:r#   c                 óÒ   — |                       t          dd¦  «        t          ¦   «         k    ¦  «         |                      t          dd¦  «        t	          ¦   «         k    ¦  «         dS )zó
        The right-hand argument to the non-equality operator is given a
        chance to determine the result of the operation if it is of a type
        unrelated to the L{FancyEqMixin}-based instance on the left-hand
        side.
        r   r   N)r)   r8  rG  r%   rP  r+   s    r!   Ú*test_rightHandArgumentImplementsUnequalityz8EqualityTests.test_rightHandArgumentImplementsUnequality¿  sW   € ð 	×Ò�  1™œÕ):Ñ)<Ô)<Ò<Ñ=Ô=Ð=Ø�Š�˜q !™œ­Ñ(8Ô(8Ò8Ñ9Ô9Ð9Ð9Ð9r#   N)rJ   rK   rL   r_   rZ  r\  r^  r`  rb  rd  rf  rh  rj  rM   r#   r!   rS  rS  h  s¨   € € € € € ðð ð)ð )ð )ð	7ð 	7ð 	7ð6ð 6ð 6ð@ð @ð @ð?ð ?ð ?ð	>ð 	>ð 	>ð	=ð 	=ð 	=ð;ð ;ð ;ð:ð :ð :ð :ð :r#   rS  rŽ   zgeteuid/seteuid not availablec                   óN   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ ZdS )ÚRunAsEffectiveUserTestsz;
    Test for the L{util.runAsEffectiveUser} function.
    c                 ó\  — t          ¦   «         | _        |                      t          d| j        j        ¦  «         |                      t          d| j        j        ¦  «         |                      t          d| j        j        ¦  «         |                      t          d| j        j        ¦  «         d S )NrŽ   ÚgetegidÚseteuidÚsetegid)r   rt   ru   r7   rŽ   rn  ro  rp  r+   s    r!   rw   zRunAsEffectiveUserTests.setUpÐ  s   € Ý‘h”hˆŒØ�
Š
•2�y $¤+Ô"5Ñ6Ô6Ð6Ø�
Š
•2�y $¤+Ô"5Ñ6Ô6Ð6Ø�
Š
•2�y $¤+Ô"5Ñ6Ô6Ð6Ø�
Š
•2�y $¤+Ô"5Ñ6Ô6Ð6Ð6Ð6r#   c                 óÂ   — |                       ||k    p|| j        j        d         k    ¦  «         |                       ||k    p|| j        j        d         k    ¦  «         dS )zF
        Check if wanted UID/GID matched start or saved ones.
        éÿÿÿÿN)r%   rt   r„   ÚsetegidCalls)r   ÚstartUIDÚstartGIDÚwantUIDÚwantGIDs        r!   Ú_securedFunctionz(RunAsEffectiveUserTests._securedFunction×  sb   € ð 	�Š˜ 8Ò+ÐV¨w¸$¼+Ô:RÐSUÔ:VÒ/VÑWÔWÐWØ�Š˜ 8Ò+ÐV¨w¸$¼+Ô:RÐSUÔ:VÒ/VÑWÔWÐWÐWÐWr#   c                 ó`   — t          j        ddd„ ¦  «        }|                      |d¦  «         dS )zo
        L{util.runAsEffectiveUser} forwards the result obtained by calling the
        given function
        r   c                  ó   — dS )Nr   rM   rM   r#   r!   ú<lambda>z<RunAsEffectiveUserTests.test_forwardResult.<locals>.<lambda>ã  s   € °q€ r#   r   N©r   ÚrunAsEffectiveUserr   ©r   rÕ   s     r!   Útest_forwardResultz*RunAsEffectiveUserTests.test_forwardResultÞ  s6   € õ
 Ô(¨¨A¨y¨yÑ9Ô9ˆØ×Ò˜ Ñ#Ô#Ð#Ð#Ð#r#   c                 ób   — t          j        ddd„ d¦  «        }|                      |d¦  «         dS )ze
        L{util.runAsEffectiveUser} pass the given parameters to the given
        function.
        r   c                 ó   — d| z  S )Nr   rM   )r™   s    r!   r{  z=RunAsEffectiveUserTests.test_takeParameters.<locals>.<lambda>ë  s
   € ¸¸Q¹€ r#   r   r   Nr|  r~  s     r!   Útest_takeParametersz+RunAsEffectiveUserTests.test_takeParametersæ  s8   € õ
 Ô(¨¨A¨¨ÀÑBÔBˆØ×Ò˜ Ñ#Ô#Ð#Ð#Ð#r#   c                 óh   — t          j        ddd	d„dd¬¦  «        }|                      |d¦  «         dS )
zg
        L{util.runAsEffectiveUser} pass the keyword parameters to the given
        function.
        r   r   c                 ó   — | |z  |z  S r•   rM   )r™   rš   Úzs      r!   r{  zDRunAsEffectiveUserTests.test_takesKeyworkArguments.<locals>.<lambda>ó  s   € À1ÀqÁ5È1Á9€ r#   r   r   )r…  r   Nr(  r|  r~  s     r!   Útest_takesKeyworkArgumentsz2RunAsEffectiveUserTests.test_takesKeyworkArgumentsî  sC   € õ
 Ô(¨¨AÐ/LÐ/LÐ/LÈaÐSTÐUÑUÔUˆØ×Ò˜ Ñ#Ô#Ð#Ð#Ð#r#   c           	      ó$  — || j         _        || j         _        t          j        ||| j        ||||¦  «         |                      | j         j        |¦  «         |                      | j         j        |¦  «         g | j         _        g | j         _        dS )zÏ
        Helper method checking the calls to C{os.seteuid} and C{os.setegid}
        made by L{util.runAsEffectiveUser}, when switching from startUID to
        wantUID and from startGID to wantGID.
        N)	rt   r�   Úegidr   r}  rx  r   r„   rs  )r   rt  ru  rv  rw  ÚexpectedUIDSwitchesÚexpectedGIDSwitchess          r!   Ú_testUIDGIDSwitchz)RunAsEffectiveUserTests._testUIDGIDSwitchö  s™   € ð $ˆŒÔØ#ˆŒÔÝÔØØØÔ!ØØØØñ	
ô 	
ð 	
ð 	×Ò˜œÔ1Ð3FÑGÔGÐGØ×Ò˜œÔ1Ð3FÑGÔGÐGØ#%ˆŒÔ Ø#%ˆŒÔ Ð Ð r#   c           	      óæ   — |                       ddddg g ¦  «         |                       ddddddgg ¦  «         |                       ddddg ddg¦  «         |                       ddddddgddg¦  «         dS )zL
        Check UID/GID switches when current effective UID is root.
        r   r   N©r‹  r+   s    r!   Ú	test_rootz!RunAsEffectiveUserTests.test_root  s’   € ð 	×Ò˜q ! Q¨¨2¨rÑ2Ô2Ð2Ø×Ò˜q ! Q¨¨A¨q¨6°2Ñ6Ô6Ð6Ø×Ò˜q ! Q¨¨2°°1¨vÑ6Ô6Ð6Ø×Ò˜q ! Q¨¨A¨q¨6°A°q°6Ñ:Ô:Ð:Ð:Ð:r#   c           	      óê   — |                       ddddddgg ¦  «         |                       ddddg g ¦  «         |                       ddddg d¢ddg¦  «         |                       ddddg d¢ddg¦  «         dS )zP
        Check UID/GID switches when current effective UID is non-root.
        r   r   ©r   r   r   r   r   ©r   r   r   r   Nr�  r+   s    r!   Útest_UIDz RunAsEffectiveUserTests.test_UID  s–   € ð 	×Ò˜q ! Q¨¨A¨q¨6°2Ñ6Ô6Ð6Ø×Ò˜q ! Q¨¨2¨rÑ2Ô2Ð2Ø×Ò˜q ! Q¨¨<¨<¨<¸!¸Q¸Ñ@Ô@Ð@Ø×Ò˜q ! Q¨¨<¨<¨<¸!¸Q¸Ñ@Ô@Ð@Ð@Ð@r#   c           	      óæ   — |                       ddddg ddg¦  «         |                       ddddg g ¦  «         |                       ddddddgg ¦  «         |                       ddddddgddg¦  «         dS )zP
        Check UID/GID switches when current effective GID is non-root.
        r   r   r   Nr�  r+   s    r!   Útest_GIDz RunAsEffectiveUserTests.test_GID&  s’   € ð 	×Ò˜q ! Q¨¨2°°1¨vÑ6Ô6Ð6Ø×Ò˜q ! Q¨¨2¨rÑ2Ô2Ð2Ø×Ò˜q ! Q¨¨A¨q¨6°2Ñ6Ô6Ð6Ø×Ò˜q ! Q¨¨A¨q¨6°A°q°6Ñ:Ô:Ð:Ð:Ð:r#   c           	      óš  — |                       ddddddgddg¦  «         |                       ddddddgg ¦  «         |                       ddddg d¢ddg¦  «         |                       ddddg g ¦  «         |                       ddddg d¢g ¦  «         |                       ddddg d¢ddg¦  «         |                       ddddg d¢ddg¦  «         dS )zT
        Check UID/GID switches when current effective UID/GID is non-root.
        r   r   r�  r   r‘  Nr�  r+   s    r!   Útest_UIDGIDz#RunAsEffectiveUserTests.test_UIDGID/  s  € ð 	×Ò˜q ! Q¨¨A¨q¨6°A°q°6Ñ:Ô:Ð:Ø×Ò˜q ! Q¨¨A¨q¨6°2Ñ6Ô6Ð6Ø×Ò˜q ! Q¨¨<¨<¨<¸!¸Q¸Ñ@Ô@Ð@Ø×Ò˜q ! Q¨¨2¨rÑ2Ô2Ð2Ø×Ò˜q ! Q¨¨<¨<¨<¸Ñ<Ô<Ð<Ø×Ò˜q ! Q¨¨<¨<¨<¸!¸Q¸Ñ@Ô@Ð@Ø×Ò˜q ! Q¨¨<¨<¨<¸!¸Q¸Ñ@Ô@Ð@Ð@Ð@r#   N)rJ   rK   rL   r_   rw   rx  r  r‚  r†  r‹  rŽ  r’  r”  r–  rM   r#   r!   rl  rl  Ê  s¿   € € € € € ðð ð7ð 7ð 7ðXð Xð Xð$ð $ð $ð$ð $ð $ð$ð $ð $ð&ð &ð &ð<;ð ;ð ;ðAð Að Að;ð ;ð ;ð
Að 
Að 
Að 
Að 
Ar#   rl  z.stdlib support for initgroups is not availablec                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚInitGroupsTestsz'
    Tests for L{util.initgroups}.
    c                 ó˜  ‡— g Šˆfd„}|                       t          d|¦  «         g }|                       t          d|j        ¦  «         t          j        t	          j        ¦   «         d¦  «         |                      ‰t                               t	          j        ¦   «         ¦  «        j	        dfg¦  «         |  
                    |¦  «         dS )zc
        Calling L{util.initgroups} will call the underlying stdlib
        implmentation.
        c                 ó6   •— ‰                      | |f¦  «         d S r•   )ry   )r™   rš   rd   s     €r!   ÚmockInitgroupsz?InitGroupsTests.test_initgroupsInStdlib.<locals>.mockInitgroupsI  s   ø€ Ø�LŠL˜!˜Q˜Ñ Ô Ð Ð Ð r#   Ú_initgroupsÚ	setgroupsr   N)ru   r   ry   rs   r7   r8   r   r5   r6   r9   r)   )r   r›  ÚsetgroupsCallsrd   s      @r!   Útest_initgroupsInStdlibz'InitGroupsTests.test_initgroupsInStdlibB  s¾   ø€ ð
 ˆð	!ð 	!ð 	!ð 	!ð 	!ð 	�
Š
•4˜¨Ñ7Ô7Ð7ØˆØ�
Š
•4˜ nÔ&;Ñ<Ô<Ð<åŒ�œ	™œ QÑ'Ô'Ð'Ø×Ò˜¥#§,¢,­r¬y©{¬{Ñ";Ô";Ô"CÀQÐ!GÐ HÑIÔIÐIØ×Ò˜Ñ(Ô(Ð(Ð(Ð(r#   c                 óv   — |                       t          t          j        t	          j        ¦   «         d¦  «         dS )zN
        Calling L{util.initgroups} with None for gid gives an error.
        N)r4  r*   r   rs   r7   r8   r+   s    r!   Útest_initgroupsNoneGidz&InitGroupsTests.test_initgroupsNoneGidT  s,   € ð 	×Ò�)¥T¤_µb´i±k´kÀ4ÑHÔHÐHÐHÐHr#   N)rJ   rK   rL   r_   rŸ  r¡  rM   r#   r!   r˜  r˜  <  sA   € € € € € ðð ð)ð )ð )ð$Ið Ið Ið Ið Ir#   r˜  c                   óD   — e Zd ZdZd„ Zd„ Z eed¬¦  «        ge_        dS )ÚDeprecationTestsz;
    Tests for deprecations in C{twisted.python.util}.
    c                 ó<  — t          j        ¦   «          |                      | j        g¬¦  «        }|                      |d         d         d¦  «         |                      |d         d         t
          ¦  «         |                      t          |¦  «        d¦  «         dS )z6
        L{util.getPluginDirs} is deprecated.
        r½   r   r‡   zCtwisted.python.util.getPluginDirs is deprecated since Twisted 12.2.r¿   r   N)r   ÚgetPluginDirsrˆ   Útest_getPluginDirsr   rÂ   r‰   ©r   r‹   s     r!   r¦  z#DeprecationTests.test_getPluginDirs`  s§   € õ 	ÔÑÔÐØ×,Ò,Ø $Ô 7Ð8ð -ñ 
ô 
ˆð 	×ÒØ˜AÔ˜yÔ)ØTñ	
ô 	
ð 	
ð 	×Ò˜¨Ô+¨JÔ7Õ9KÑLÔLÐLØ×Ò�˜_Ñ-Ô-¨qÑ1Ô1Ð1Ð1Ð1r#   c                 ó<  — t          j        ¦   «          |                      | j        g¬¦  «        }|                      |d         d         d¦  «         |                      |d         d         t
          ¦  «         |                      t          |¦  «        d¦  «         dS )z5
        L{util.addPluginDir} is deprecated.
        r½   r   r‡   zBtwisted.python.util.addPluginDir is deprecated since Twisted 12.2.r¿   r   N)r   ÚaddPluginDirrˆ   Útest_addPluginDirr   rÂ   r‰   r§  s     r!   rª  z"DeprecationTests.test_addPluginDiro  s§   € õ 	ÔÑÔÐØ×,Ò,Ø $Ô 6Ð7ð -ñ 
ô 
ˆð 	×ÒØ˜AÔ˜yÔ)ØSñ	
ô 	
ð 	
ð 	×Ò˜¨Ô+¨JÔ7Õ9KÑLÔLÐLØ×Ò�˜_Ñ-Ô-¨qÑ1Ô1Ð1Ð1Ð1r#   z/twisted.python.util.getPluginDirs is deprecated)r¿   r‡   N)	rJ   rK   rL   r_   r¦  rª  ÚSUPPRESSrÂ   r   rM   r#   r!   r£  r£  [  s_   € € € € € ðð ð2ð 2ð 2ð2ð 2ð 2ð  	ˆØ'ØEð	
ñ 	
ô 	
ð"ÐÔÐÐr#   r£  c                   óJ   — e Zd ZdZ eej        ¦  «        Zd„ Zd„ Zd„ Z	d„ Z
dS )ÚSuppressedWarningsTestsz6
    Tests for L{util.runWithWarningsSuppressed}.
    c                 óê   — di fdi fg}|                       |t          j        d¦  «         |                       |t          j        d¦  «         |                      g |                      ¦   «         ¦  «         dS )zŽ
        Warnings from the function called by C{runWithWarningsSuppressed} are
        suppressed if they match the passed in filter.
        ©Úignorez.*foo.*©r°  z.*bar.*ú
ignore fooz
ignore barN©ÚrunWithWarningsSuppressedÚwarningsÚwarnr   rˆ   ©r   Úfilterss     r!   Ú&test_runWithWarningsSuppressedFilteredz>SuppressedWarningsTests.test_runWithWarningsSuppressedFiltered�  su   € ð
 *¨2Ð.Ð1FÈÐ0KÐLˆØ×&Ò& wµ´¸|ÑLÔLÐLØ×&Ò& wµ´¸|ÑLÔLÐLØ×Ò˜˜T×/Ò/Ñ1Ô1Ñ2Ô2Ð2Ð2Ð2r#   c                 ó¾   — di fdi fg}|                       |t          j        d¦  «         |                      dgd„ |                      ¦   «         D ¦   «         ¦  «         dS )z™
        Warnings from the function called by C{runWithWarningsSuppressed} are
        not suppressed if they do not match the passed in filter.
        r¯  r±  zdon't ignorec                 ó   — g | ]
}|d          ‘ŒS ©r‡   rM   ©Ú.0r  s     r!   ú
<listcomp>zTSuppressedWarningsTests.test_runWithWarningsSuppressedUnfiltered.<locals>.<listcomp>ž  s   € Ð+WÐ+WÐ+W¸Q¨A¨i¬LÐ+WÐ+WÐ+Wr#   Nr³  r·  s     r!   Ú(test_runWithWarningsSuppressedUnfilteredz@SuppressedWarningsTests.test_runWithWarningsSuppressedUnfiltered—  sm   € ð
 *¨2Ð.Ð1FÈÐ0KÐLˆØ×&Ò& wµ´¸~ÑNÔNÐNØ×Ò˜.Ð)Ð+WÐ+WÀ$×BTÒBTÑBVÔBVÐ+WÑ+WÔ+WÑXÔXÐXÐXÐXr#   c                 ó\   — |                       |                      g d„ ¦  «        d¦  «         dS )zd
        C{runWithWarningsSuppressed} returns the result of the function it
        called.
        c                  ó   — dS )Nr   rM   rM   r#   r!   r{  z:SuppressedWarningsTests.test_passThrough.<locals>.<lambda>¥  s   € ÀA€ r#   r   N)r   r´  r+   s    r!   Útest_passThroughz(SuppressedWarningsTests.test_passThrough   s2   € ð
 	×Ò˜×7Ò7¸¸I¸IÑFÔFÈÑJÔJÐJÐJÐJr#   c                 óÒ   — di fdi fg}|                       |d„ ¦  «         t          j        d¦  «         |                      dgd„ |                      ¦   «         D ¦   «         ¦  «         dS )zk
        Once C{runWithWarningsSuppressed} has returned, it no longer
        suppresses warnings.
        r¯  r±  c                  ó   — d S r•   rM   rM   r#   r!   r{  z<SuppressedWarningsTests.test_noSideEffects.<locals>.<lambda>­  s   € ¸€ r#   r²  c                 ó   — g | ]
}|d          ‘ŒS r¼  rM   r½  s     r!   r¿  z>SuppressedWarningsTests.test_noSideEffects.<locals>.<listcomp>¯  s   € Ð)UÐ)UÐ)U¸1¨!¨I¬,Ð)UÐ)UÐ)Ur#   Nr³  r·  s     r!   Útest_noSideEffectsz*SuppressedWarningsTests.test_noSideEffects§  sz   € ð
 *¨2Ð.Ð1FÈÐ0KÐLˆØ×&Ò& w°°Ñ=Ô=Ð=ÝŒ�lÑ#Ô#Ð#Ø×Ò˜,˜Ð)UÐ)UÀ×@RÒ@RÑ@TÔ@TÐ)UÑ)UÔ)UÑVÔVÐVÐVÐVr#   N)rJ   rK   rL   r_   Ústaticmethodr   r´  r¹  rÀ  rÃ  rÇ  rM   r#   r!   r­  r­  †  sz   € € € € € ðð ð !- ¨TÔ-KÑ LÔ LÐð3ð 3ð 3ðYð Yð YðKð Kð KðWð Wð Wð Wð Wr#   r­  c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚFancyStrMixinTestsz*
    Tests for L{util.FancyStrMixin}.
    c                 óŒ   —  G d„ dt           j        ¦  «        }|                      t           |¦   «         ¦  «        d¦  «         dS )zž
        If C{showAttributes} is set to a sequence of strings, C{__str__}
        renders using those by looking them up as attributes on the object.
        c                   ó   — e Zd ZdZdZdZdS )ú6FancyStrMixinTests.test_sequenceOfStrings.<locals>.Foo©ÚfirstÚsecondr   ÚhelloN©rJ   rK   rL   ÚshowAttributesrÏ  rÐ  rM   r#   r!   rV   rÍ  ½  ó   € € € € € Ø0ˆNØˆEØˆFˆFˆFr#   rV   z<Foo first=1 second='hello'>N©r   ÚFancyStrMixinr   Ústr©r   rV   s     r!   Útest_sequenceOfStringsz)FancyStrMixinTests.test_sequenceOfStrings·  sZ   € ð	ð 	ð 	ð 	ð 	•$Ô$ñ 	ô 	ð 	ð
 	×Ò�˜S˜S™UœU™œÐ%CÑDÔDÐDÐDÐDr#   c                 óŒ   —  G d„ dt           j        ¦  «        }|                      dt           |¦   «         ¦  «        ¦  «         dS )a  
        If C{showAttributes} has an item that is a 2-tuple, C{__str__} renders
        the first item in the tuple as a key and the result of calling the
        second item with the value of the attribute named by the first item as
        the value.
        c                   ó$   — e Zd Zddd„ ffZdZdZdS )ú.FancyStrMixinTests.test_formatter.<locals>.FoorÏ  rÐ  c                 ó2   — t          | d d d…         ¦  «        S )Nrr  )rÒ   )Úvalues    r!   r{  z7FancyStrMixinTests.test_formatter.<locals>.Foo.<lambda>Í  s   € ÅÀUÈ4È4ÈRÈ4Ä[Ñ@QÔ@Q€ r#   rÑ  ÚworldNrÒ  rM   r#   r!   rV   rÜ  Ì  s+   € € € € € Ø%¨Ð2QÐ2QÐ'RÐSˆNØˆEØˆFˆFˆFr#   rV   z"<Foo first='hello' second='dlrow'>NrÕ  rØ  s     r!   Útest_formatterz!FancyStrMixinTests.test_formatterÄ  sZ   € ð	ð 	ð 	ð 	ð 	•$Ô$ñ 	ô 	ð 	ð
 	×ÒÐ=½sÀ3À3Á5Ä5¹z¼zÑJÔJÐJÐJÐJr#   c                 óŒ   —  G d„ dt           j        ¦  «        }|                      t           |¦   «         ¦  «        d¦  «         dS )a&  
        If C{showAttributes} has an item that is a 3-tuple, C{__str__} renders
        the second item in the tuple as a key, and the contents of the
        attribute named in the first item are rendered as the value. The value
        is formatted using the third item in the tuple.
        c                   ó   — e Zd ZdZdZdZdS )ú-FancyStrMixinTests.test_override.<locals>.Foo)rÏ  )rÐ  Ú2ndz%.1fr   gÙÎ÷Sã @NrÒ  rM   r#   r!   rV   rã  Û  s   € € € € € ØAˆNØˆEØˆFˆFˆFr#   rV   z<Foo first=1 2nd=2.1>NrÕ  rØ  s     r!   Útest_overridez FancyStrMixinTests.test_overrideÓ  sZ   € ð	ð 	ð 	ð 	ð 	•$Ô$ñ 	ô 	ð 	ð
 	×Ò�˜S˜S™UœU™œÐ%<Ñ=Ô=Ð=Ð=Ð=r#   c                 óŒ   —  G d„ dt           j        ¦  «        }|                      t           |¦   «         ¦  «        d¦  «         dS )z_
        If C{fancybasename} is present, C{__str__} uses it instead of the class name.
        c                   ó   — e Zd ZdZdS )ú2FancyStrMixinTests.test_fancybasename.<locals>.FooÚBarN)rJ   rK   rL   ÚfancybasenamerM   r#   r!   rV   rè  ç  s   € € € € € Ø!ˆMˆMˆMr#   rV   z<Bar>NrÕ  rØ  s     r!   Útest_fancybasenamez%FancyStrMixinTests.test_fancybasenameâ  sY   € ð
	"ð 	"ð 	"ð 	"ð 	"•$Ô$ñ 	"ô 	"ð 	"ð 	×Ò�˜S˜S™UœU™œ WÑ-Ô-Ð-Ð-Ð-r#   c                 óª   —  G d„ dt           j        ¦  «        } |¦   «         }|                      t          |¦  «        t	          |¦  «        ¦  «         dS )zE
        C{__repr__} outputs the same content as C{__str__}.
        c                   ó   — e Zd ZdZdZdZdS )ú)FancyStrMixinTests.test_repr.<locals>.FoorÎ  r   rÑ  NrÒ  rM   r#   r!   rV   rî  ñ  rÔ  r#   rV   N)r   rÖ  r   r×  rÒ   )r   rV   Úobjs      r!   Ú	test_reprzFancyStrMixinTests.test_reprì  sd   € ð
	ð 	ð 	ð 	ð 	•$Ô$ñ 	ô 	ð 	ð
 ˆc‰eŒeˆØ×Ò�˜S™œ¥4¨¡9¤9Ñ-Ô-Ð-Ð-Ð-r#   N)	rJ   rK   rL   r_   rÙ  rà  rå  rë  rð  rM   r#   r!   rÊ  rÊ  ²  so   € € € € € ðð ðEð Eð EðKð Kð Kð>ð >ð >ð.ð .ð .ð.ð .ð .ð .ð .r#   rÊ  c                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	S )
Ú
PadToTestsz"
    Tests for L{util.padTo}.
    c                 ód   — t          j        dg ¦  «        }|                      dgdz  |¦  «         dS )ze
        L{None} values can be added to a list to cause it to have a certain
        length.
        r   N©r   ÚpadTor   ©r   Úpaddeds     r!   Útest_defaultzPadToTests.test_defaultÿ  s7   € õ
 ”˜A˜rÑ"Ô"ˆØ×Ò˜$˜ !™ VÑ,Ô,Ð,Ð,Ð,r#   c                 óf   — t          j        dg d¦  «        }|                      dgdz  |¦  «         dS )zg
        A specific value can be added to a list to cause it to have a certain
        length.
        r   r™   Nrô  rö  s     r!   Útest_specificDefaultValuez$PadToTests.test_specificDefaultValue  s9   € õ
 ”˜A˜r 3Ñ'Ô'ˆØ×Ò˜#˜ ™ FÑ+Ô+Ð+Ð+Ð+r#   c                 óf   — t          j        dddgd¦  «        }|                      g d¢|¦  «         dS )zl
        A list which already has some items has the padding value added after
        those items.
        r   r   r   r…  )r   r   r…  Nrô  rö  s     r!   Útest_padNonEmptyListzPadToTests.test_padNonEmptyList  s;   € õ
 ”˜A  1˜v sÑ+Ô+ˆØ×Ò˜˜˜ fÑ-Ô-Ð-Ð-Ð-r#   c                 óX   — |                       t          t          j        dddg¦  «         dS )z{
        L{util.padTo} can't pad a list if the size requested is smaller than
        the size of the list to pad.
        r   r   N)r4  r5  r   rõ  r+   s    r!   Útest_padToSmallerSizez PadToTests.test_padToSmallerSize  s*   € ð
 	×Ò�*¥d¤j°!°a¸°VÑ<Ô<Ð<Ð<Ð<r#   c                 ó~   — ddg}t          j        t          |¦  «        |¦  «        }|                      ||¦  «         dS )zŠ
        If the list is already the length indicated by the padding argument
        then a list with the same value is returned.
        r   r   N)r   rõ  r‰   r   ©r   rÔ   r÷  s      r!   Útest_alreadyPaddedzPadToTests.test_alreadyPadded  s@   € ð
 �A�ˆÝ”�C ™JœJ¨Ñ.Ô.ˆØ×Ò˜ Ñ'Ô'Ð'Ð'Ð'r#   c                 ó~   — ddg}t          j        t          |¦  «        |¦  «        }|                      ||¦  «         dS )z‹
        If the list is already the length indicated by the padding argument
        then the return value is a copy of the input.
        r   r   N)r   rõ  r‰   ÚassertIsNotr   s      r!   Útest_alreadyPaddedCopiesz#PadToTests.test_alreadyPaddedCopies'  s@   € ð
 �A�ˆÝ”�C ™JœJ¨Ñ.Ô.ˆØ×Ò˜ Ñ'Ô'Ð'Ð'Ð'r#   c                 ó`   — g }t          j        d|¦  «         |                      g |¦  «         dS )zO
        L{util.padTo} doesn't modify the input list but makes a copy.
        r   Nrô  )r   rÔ   s     r!   Útest_makeCopyzPadToTests.test_makeCopy0  s7   € ð ˆÝŒ
�1�eÑÔÐØ×Ò˜˜UÑ#Ô#Ð#Ð#Ð#r#   N)rJ   rK   rL   r_   rø  rú  rü  rþ  r  r  r  rM   r#   r!   rò  rò  ú  s‡   € € € € € ðð ð-ð -ð -ð,ð ,ð ,ð.ð .ð .ð=ð =ð =ð(ð (ð (ð(ð (ð (ð$ð $ð $ð $ð $r#   rò  )Gr_   rg   Úos.pathr7   r  rû   rµ  Útypingr   r   r   r   Úunittestr   rC   Ú_grpr5   Ú_pwdÚImportErrorÚtwisted.internetr   Útwisted.internet.deferr	   Útwisted.internet.errorr
   Útwisted.internet.interfacesr   Útwisted.internet.protocolr   Útwisted.pythonr   Útwisted.python.filepathr   Útwisted.test.test_processr   Útwisted.trial.unittestr   r   Útwisted.trial.utilr   r«  Ú
executableÚ_asBytesPathrø   r   rO   ra   Úgetattrrq   r’   rº   rÄ   rá   Ú
providedByrð   r  r  rX  r8  rB  rE  rG  rP  rS  rl  rœ  r˜  r£  r­  rÊ  rò  rM   r#   r!   ú<module>r     s’  ðð
ð ð
 €€€Ø €€€Ø €€€Ø 
€
€
€
Ø €€€Ø >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ø Ð Ð Ð Ð Ð ðØÐÐÐØÐÐÐð
 €CØ
€C€Cøð ð ð ð Ø
€CØ
€C€C€Cðøøøð %Ð $Ð $Ð $Ð $Ð $Ø +Ð +Ð +Ð +Ð +Ð +Ø .Ð .Ð .Ð .Ð .Ð .Ø 7Ð 7Ð 7Ð 7Ð 7Ð 7Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø Ð Ð Ð Ð Ð Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3àˆ�”Ñ Ô ×-Ò-Ñ/Ô/€ð.Jð .Jð .Jð .Jð .J�ñ .Jô .Jð .JðbVð Vð Vð Vð V�xñ Vô Vð Vð*(ð (ð (ð (ð (˜(ñ (ô (ð (ð> €ˆGˆG�B˜ $Ñ'Ô'Ð'Ð)FÑGÔGðCVð CVð CVð CVð CV�Xñ CVô CVñ HÔGðCVðL]'ð ]'ð ]'ð ]'ð ]' ñ ]'ô ]'ð ]'ð@2ð 2ð 2ð 2ð 2�xñ 2ô 2ð 2ð.M-ð M-ð M-ð M-ð M-˜8ñ M-ô M-ð M-ð`6ð 6ð 6ð 6ð 6 _ñ 6ô 6ð 6ð" €Ø"ˆÔ" 7Ñ+Ô+Ð+Ø2ñô ð7ð 7ð 7ð 7ð 7�xñ 7ô 7ñ	ô ð7ðD+ð +ð +ð +ð +˜ñ +ô +ð +ð.J<ð J<ð J<ð J<ð J< ñ J<ô J<ð J<ðZ	ð 	ð 	ð 	ð 	ˆTÔñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	�dÔ'ñ 	ô 	ð 	ðð ð ð ð �Fñ ô ð ðð ð ð ð ñ ô ð ðð ð ð ð ñ ô ð ð_:ð _:ð _:ð _:ð _:�Hñ _:ô _:ð _:ðD €ˆGˆG�B˜	 4Ñ(Ô(Ð(Ð*IÑJÔJðnAð nAð nAð nAð nA˜hñ nAô nAñ KÔJðnAðb €ˆDÔÐÐNÑOÔOðIð Ið Ið Ið I�hñ Iô Iñ PÔOðIð<(ð (ð (ð (ð (�xñ (ô (ð (ðV)Wð )Wð )Wð )Wð )W˜hñ )Wô )Wð )WðXE.ð E.ð E.ð E.ð E.˜ñ E.ô E.ð E.ðP<$ð <$ð <$ð <$ð <$�ñ <$ô <$ð <$ð <$ð <$s   ª7 ·	AÁA