+
    üÐjHˆ  ã                   óJ  € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	H
t
Ht ^ RIHt  ^ RIt^ RIt]t]t^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IH t  ^ RI!H"t" ^ RI#H$t$H%t% ^ RI&H't( ] ! ]PR                  4      PU                  4       t+ ! R R]%4      t, ! R R]%4      t- ! R R]%4      t.]! ]/! ]RR4      '       * R4       ! R R]%4      4       t0 ! R R]%4      t1 ! R R]%4      t2 ! R R]%4      t3 ! R R]4      t4]! ]Pj                  ! ]4      '       * R 4       ! R! R"]%4      4       t6 ! R# R$]%4      t7 ! R% R&]%4      t8 ! R' R(]Pr                  4      t: ! R) R*]Pr                  4      t; ! R+ R,]:4      t< ! R- R.4      t= ! R/ R04      t> ! R1 R2]%4      t?]! ]/! ]R3R4      '       * R44       ! R5 R6]%4      4       t@]! ]P‚                  '       * R74       ! R8 R9]%4      4       tB ! R: R;]%4      tC ! R< R=]%4      tD ! R> R?]%4      tE ! R@ RA]%4      tFR#   ] d	    RtRt ELëi ; i)Bz#
Tests for L{twisted.python.util}.
N)ÚIterableÚMappingÚMutableMappingÚSequence)ÚskipIf)Úreactor)ÚDeferred)ÚProcessDone)ÚIReactorProcess)ÚProcessProtocol)Úutil)ÚFilePath)ÚMockOS)ÚFailTestÚTestCase)Úsuppressc                   ó|   a € ] tR t^*t o R tR tR t]! ]RJ R4      R 4       t	R t
]! ]RJ R4      R	 4       tR
tV tR# )Ú	UtilTestsc                ó^   € . ROpV P                  \        P                  ! V4      . RO4       R# )ÚaN)r   é   Úabr   é   é   r   é   r   r   é   )r   r   r   r   r   r   r   )ÚassertEqualr   Úuniquify)ÚselfÚlistWithDupess   & Ú?/usr/lib/python3/dist-packages/twisted/python/test/test_util.pyÚtestUniqÚUtilTests.testUniq+   s!   € Ú@ˆØ×ÑœŸš }Ó5Ò7QÖRó    c                ó@  € V P                  \        P                  ! \        \        ^^ 4      4       V P                  \        P                  ! \        \        ^ ^4      4        \        P                  ! \        \        ^^ 4       \        R4      h  \         d     R# i ; i)r   z,util.raises didn't raise when it should haveN)Ú
assertTruer   ÚraisesÚZeroDivisionErrorÚdivmodÚassertFalseÚ	TypeErrorr   ©r   s   &r    Ú
testRaisesÚUtilTests.testRaises/   sv   € Ø�‰œŸšÔ$5´v¸qÀ!ÓDÔEØ×ÑœŸšÔ%6¼ÀÀ1ÓEÔFð	KÜ�KŠKœ	¤6¨1¨aÔ0ô ÐIÓJÐJøô !ô 	Úð	ús   Á"!B ÂBÂBc                óR   € V P                  \        P                  ! R4      ^d4       R# )ún
When L{uidFromString} is called with a base-ten string representation
of an integer, it returns the integer.
Ú100N)r   r   ÚuidFromStringr+   s   &r    Útest_uidFromNumericStringÚ#UtilTests.test_uidFromNumericString:   ó   € ð
 	×Ñœ×+Ò+¨EÓ2°CÖ8r#   Nz0Username/UID conversion requires the pwd module.c                óÊ   € \         P                  \        P                  ! 4       4      pV P	                  \
        P                  ! VP                  4      VP                  4       R# )r/   N)	ÚpwdÚgetpwuidÚosÚgetuidr   r   r1   Úpw_nameÚpw_uid)r   Úpwents   & r    Útest_uidFromUsernameStringÚ$UtilTests.test_uidFromUsernameStringA   ó;   € ô —‘œRŸYšY›[Ó)ˆØ×Ñœ×+Ò+¨E¯M©MÓ:¸E¿L¹LÖIr#   c                óR   € V P                  \        P                  ! R4      ^d4       R# )ún
When L{gidFromString} is called with a base-ten string representation
of an integer, it returns the integer.
r0   N)r   r   ÚgidFromStringr+   s   &r    Útest_gidFromNumericStringÚ#UtilTests.test_gidFromNumericStringJ   r4   r#   z2Group Name/GID conversion requires the grp module.c                óÊ   € \         P                  \        P                  ! 4       4      pV P	                  \
        P                  ! VP                  4      VP                  4       R# )rA   N)	ÚgrpÚgetgrgidr8   Úgetgidr   r   rB   Úgr_nameÚgr_gid)r   Úgrents   & r    Útest_gidFromGroupnameStringÚ%UtilTests.test_gidFromGroupnameStringQ   r?   r#   © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r!   r,   r2   r   r6   r=   rC   rF   rL   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r    r   r   *   sa   ø‡ € òSò	Kò9ñ ˆC�4ˆKÐKÓLñJó MðJò9ñ ˆC�4ˆKÐMÓNñJó OöJr#   r   c                   ó*   a € ] tR t^[t o RtR tRtV tR# )ÚNameToLabelTestsz
Tests for L{nameToLabel}.
c                óŒ   € . ROpV F9  w  r#\         P                  ! V4      pV P                  WCRV: RV: RV: 24       K;  	  R# )z;
Test the various kinds of inputs L{nameToLabel} supports.
znameToLabel(z) == z != N))ÚfÚF)ÚfoÚFo)ÚfooÚFoo)ÚfooBarzFoo Bar)Ú	fooBarBazzFoo Bar Baz)r   ÚnameToLabelr   )r   ÚnameDataÚinpÚoutÚgots   &    r    Útest_nameToLabelÚ!NameToLabelTests.test_nameToLabel`   sJ   € ò
ˆó !‰HˆCÜ×"Ò" 3Ó'ˆCØ×Ñ˜S¨°c±W¸EÀ#ÁÈÈSÉGÐ'TÖUó !r#   rN   N)rO   rP   rQ   rR   Ú__doc__rg   rS   rT   rU   s   @r    rX   rX   [   s   ø‡ € ñ÷Vð Vr#   rX   c                   ó*   a € ] tR t^pt o RtR tRtV tR# )ÚUntilConcludesTestsz2
Tests for L{untilConcludes}, an C{EINTR} helper.
c                ót  a € V 3R lpR.S n         ^ S n        S P                  \        P                  ! V^^4      ^4       S P                  S P                  ^4       R\
        \        .S n         ^ S n        S P                  \        P                  ! V^^4      ^4       S P                  S P                  ^4       R# )zÛ
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                 ó°   <€ S;P                   ^,          un         SP                  P                  4       pVe   V! \        P                  R4      hW,           # )r   zInterrupted system call!)ÚcallsÚ
exceptionsÚpopÚerrnoÚEINTR)r   ÚbÚexcr   s   && €r    rZ   Ú3UntilConcludesTests.test_uninterruptably.<locals>.f}   s@   ø€ Ø�JŠJ˜!�O�JØ—/‘/×%Ñ%Ó'ˆCØŠÙœ%Ÿ+™+Ð'AÓBÐBØ•5ˆLr#   N)ro   rn   r   r   ÚuntilConcludesÚOSErrorÚIOError)r   rZ   s   f r    Útest_uninterruptablyÚ(UntilConcludesTests.test_uninterruptablyu   s•   ø€ õ	ð  ˜&ˆŒØˆŒ
Ø×Ñœ×,Ò,¨Q°°1Ó5°qÔ9Ø×Ñ˜Ÿ™ QÔ'à¤¬'Ð2ˆŒØˆŒ
Ø×Ñœ×,Ò,¨Q°°1Ó5°qÔ9Ø×Ñ˜Ÿ™ QÖ'r#   )rn   ro   N)rO   rP   rQ   rR   ri   ry   rS   rT   rU   s   @r    rk   rk   p   s   ø‡ € ñ÷(ð (r#   rk   r9   zgetuid/setuid not availablec                   óH   a € ] tR t^�t o RtR tR tR tR tR t	R t
RtV tR	# )
ÚSwitchUIDTestsz
Tests for L{util.switchUID}.
c                ó¶   € \        4       V n        V P                  \        R V P                  4       V P                  \        RV P                  4       . V n        R# )r8   Ú
initgroupsN)r   ÚmockosÚpatchr   r~   ÚinitgroupsCallsr+   s   &r    ÚsetUpÚSwitchUIDTests.setUp•   s;   € Ü“hˆŒØ�
‰
”4˜˜tŸ{™{Ô+Ø�
‰
”4˜ t§¡Ô7Ø!ˆÖr#   c                ó>   € V P                   P                  W34       R# )z;
Save L{util.initgroups} calls in C{self.initgroupsCalls}.
N)r�   Úappend)r   ÚuidÚgids   &&&r    r~   ÚSwitchUIDTests.initgroups›   s   € ð 	×Ñ×#Ñ# S JÖ/r#   c                ó¼   € \         P                  ! RR4       V P                  V P                  R.4       V P                  V P                  P
                  R.4       R# )zV
L{util.switchUID} calls L{util.initgroups} and then C{os.setuid} with
the given uid.
éà.  N©rŠ   N)ÚsetuidrŠ   )r   Ú	switchUIDr   r�   r   Úactionsr+   s   &r    Útest_uidÚSwitchUIDTests.test_uid¡   sH   € ô
 	�Š�u˜dÔ#Ø×Ñ˜×-Ñ-°¨Ô?Ø×Ñ˜Ÿ™×,Ñ,Ð/@Ð.AÖBr#   c                ó¾   € \         P                  ! RRR4       V P                  V P                  R.4       V P                  V P                  P
                  R.4       R# )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   r�   r   ÚseteuidCallsr+   s   &r    Ú	test_euidÚSwitchUIDTests.test_euidª   sH   € ô
 	�Š�u˜d DÔ)Ø×Ñ˜×-Ñ-°¨Ô?Ø×Ñ˜Ÿ™×1Ñ1°E°7Ö;r#   c                óþ  € V P                   P                  4       p\        P                  ! VR4       V P	                  V P
                  . 4       V P	                  V P                   P                  . 4       V P                  \        P                  .4      pV P	                  \        V4      ^4       V P                  RV,          V^ ,          R,          4       V P                  RV,          V^ ,          R,          4       R# )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.
Nz&tried to drop privileges and setuid %iÚmessagezbut uid is already %i)
r   r9   r   r�   r   r�   rŽ   ÚflushWarningsÚlenÚassertIn)r   r†   ÚcurrentWarningss   &  r    Útest_currentUIDÚSwitchUIDTests.test_currentUID³   sÁ   € ð
 �k‰k× Ñ Ó"ˆÜ�Š�s˜DÔ!Ø×Ñ˜×-Ñ-¨rÔ2Ø×Ñ˜Ÿ™×,Ñ,¨bÔ1Ø×,Ñ,¬d¯n©nÐ-=Ó>ˆØ×Ñœ˜_Ó-¨qÔ1Ø�‰Ø4°sÕ:Ø˜AÕ˜yÕ)ô	
ð 	�‰Ð-°Õ3°_ÀQÕ5GÈ	Õ5RÖSr#   c                ó   € V P                   P                  4       p\        P                  ! VRR4       V P	                  V P
                  . 4       V P	                  V P                   P                  . 4       V P                  \        P                  .4      pV P	                  \        V4      ^4       V P                  RV,          V^ ,          R,          4       V P                  RV,          V^ ,          R,          4       R# )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.
NTz'tried to drop privileges and seteuid %ir–   zbut euid is already %i)
r   Úgeteuidr   r�   r   r�   r’   r—   r˜   r™   )r   Úeuidrš   s   &  r    Útest_currentEUIDÚSwitchUIDTests.test_currentEUIDÄ   sÃ   € ð
 �{‰{×"Ñ"Ó$ˆÜ�Š�t˜T 4Ô(Ø×Ñ˜×-Ñ-¨rÔ2Ø×Ñ˜Ÿ™×1Ñ1°2Ô6Ø×,Ñ,¬d¯n©nÐ-=Ó>ˆØ×Ñœ˜_Ó-¨qÔ1Ø�‰Ø5¸Õ<Ø˜AÕ˜yÕ)ô	
ð 	�‰Ð.°Õ5°ÀqÕ7IÈ)Õ7TÖUr#   )r�   r   N)rO   rP   rQ   rR   ri   r‚   r~   r�   r“   r›   r    rS   rT   rU   s   @r    r|   r|   �   s1   ø‡ € ñò"ò0òCò<òT÷"Vð Vr#   r|   c                   óB   a € ] tR t^Öt o RtR tR tR tR tR t	Rt
V tR# )	ÚMergeFunctionMetadataTestsz%
Tests for L{mergeFunctionMetadata}.
c           	     ó²   aa€ \        4       o\        4       oV3R lpRV3R llp\        P                  ! W4      pV P                  V! ^^R^
R7      S4       R# )z\
After merging C{foo}'s data into C{bar}, the returned function behaves
as if it is C{bar}.
c                  ó   <€ S # ©NrN   )Ú
foo_objects   €r    r^   ÚQMergeFunctionMetadataTests.test_mergedFunctionBehavesLikeMergeTarget.<locals>.fooã   s	   ø€ ØÐr#   c                 ó   <€ Vw  rgS# r¦   rN   )	ÚxÚyr   ÚcÚdÚer   rs   Ú
bar_objects	   &&&&*,  €r    ÚbarÚQMergeFunctionMetadataTests.test_mergedFunctionBehavesLikeMergeTarget.<locals>.baræ   s   ø€ Ø‰FˆQØÐr#   )ÚquuxN)é
   )r   r   )Úobjectr   ÚmergeFunctionMetadataÚassertIs)r   r^   r°   Úbazr¯   r§   s   &   @@r    Ú)test_mergedFunctionBehavesLikeMergeTargetÚDMergeFunctionMetadataTests.test_mergedFunctionBehavesLikeMergeTargetÛ   sH   ù€ ô
 “Xˆ
Ü“Xˆ
õ	÷	ô ×(Ò(¨Ó2ˆØ�‰‘c˜!˜Q ¨RÔ0°*Ö=r#   c                ó˜   € R pR pRVn         \        P                  ! W4      pV P                  VP                   VP                   4       R# )zL
Merging C{foo} into C{bar} returns a function with C{foo}'s
C{__module__}.
c                  ó   € R # r¦   rN   rN   r#   r    r^   Ú;MergeFunctionMetadataTests.test_moduleIsMerged.<locals>.fooó   ó   € Ùr#   c                  ó   € R # r¦   rN   rN   r#   r    r°   Ú;MergeFunctionMetadataTests.test_moduleIsMerged.<locals>.barö   r½   r#   zsomewhere.elseN)rP   r   rµ   r   ©r   r^   r°   r·   s   &   r    Útest_moduleIsMergedÚ.MergeFunctionMetadataTests.test_moduleIsMergedí   s=   € ò	ò	ð *ˆŒä×(Ò(¨Ó2ˆØ×Ñ˜Ÿ™¨¯©Ö8r#   c                óŠ   € R pR p\         P                  ! W4      pV P                  VP                  VP                  4       R# )zH
Merging C{foo} into C{bar} returns a function with C{foo}'s docstring.
c                 ó   € R# )z
This is foo.
NrN   rN   r#   r    r^   Ú>MergeFunctionMetadataTests.test_docstringIsMerged.<locals>.foo  ó   ‚ r#   c                 ó   € R# )z
This is bar.
NrN   rN   r#   r    r°   Ú>MergeFunctionMetadataTests.test_docstringIsMerged.<locals>.bar  rÆ   r#   N)r   rµ   r   ri   rÀ   s   &   r    Útest_docstringIsMergedÚ1MergeFunctionMetadataTests.test_docstringIsMergedþ   s6   € ò
	ò
	ô
 ×(Ò(¨Ó2ˆØ×Ñ˜Ÿ™ c§k¡kÖ2r#   c                óŠ   € R pR p\         P                  ! W4      pV P                  VP                  VP                  4       R# )zC
Merging C{foo} into C{bar} returns a function with C{foo}'s name.
c                  ó   € R # r¦   rN   rN   r#   r    r^   Ú9MergeFunctionMetadataTests.test_nameIsMerged.<locals>.foo  r½   r#   c                  ó   € R # r¦   rN   rN   r#   r    r°   Ú9MergeFunctionMetadataTests.test_nameIsMerged.<locals>.bar  r½   r#   N)r   rµ   r   rO   rÀ   s   &   r    Útest_nameIsMergedÚ,MergeFunctionMetadataTests.test_nameIsMerged  s6   € ò
	ò	ô ×(Ò(¨Ó2ˆØ×Ñ˜Ÿ™ s§|¡|Ö4r#   c                óZ  € R p^Vn         ^Vn        R p^Vn        ^Vn        \        P                  ! W4      pV P                  VP                   VP                   4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       R# )z^
Merging C{foo} into C{bar} returns a function with C{bar}'s
dictionary, updated by C{foo}'s.
c                  ó   € R # r¦   rN   rN   r#   r    r^   ÚGMergeFunctionMetadataTests.test_instanceDictionaryIsMerged.<locals>.foo$  r½   r#   c                  ó   € R # r¦   rN   rN   r#   r    r°   ÚGMergeFunctionMetadataTests.test_instanceDictionaryIsMerged.<locals>.bar*  r½   r#   N)r   rs   r¬   r   rµ   r   rÀ   s   &   r    Útest_instanceDictionaryIsMergedÚ:MergeFunctionMetadataTests.test_instanceDictionaryIsMerged  s„   € ò	ð ˆŒØˆŒò	ð ˆŒØˆŒä×(Ò(¨Ó2ˆØ×Ñ˜Ÿ™ §¡Ô&Ø×Ñ˜Ÿ™ §¡Ô&Ø×Ñ˜Ÿ™ §¡Ö&r#   rN   N)rO   rP   rQ   rR   ri   r¸   rÁ   rÉ   rÐ   r×   rS   rT   rU   s   @r    r£   r£   Ö   s(   ø‡ € ñò>ò$9ò"3ò$5÷'ð 'r#   r£   c                   ó*   a € ] tR tRt o RtR tRtV tR# )ÚOrderedDictTestsi6  z 
Tests for L{util.OrderedDict}.
c                ó  € ^ RI Hp V V P                  V P                  .R7      pV P	                  V^ ,          R,          R4       V P	                  V^ ,          R,          \
        4       V P	                  \        V4      ^4       R# )z$
L{util.OrderedDict} is deprecated.
)ÚOrderedDict©ÚoffendingFunctionsr–   zftwisted.python.util.OrderedDict was deprecated in Twisted 15.5.0: Use collections.OrderedDict instead.ÚcategoryN)Útwisted.python.utilrÜ   r—   Útest_deprecatedr   ÚDeprecationWarningr˜   )r   rÜ   rš   s   &  r    rá   Ú OrderedDictTests.test_deprecated;  sx   € õ 	4áà×,Ñ,À×AUÑAUÐ@VÐ,ÓWˆØ×ÑØ˜AÕ˜yÕ)ð;ô	
ð
 	×Ñ˜¨Õ+¨JÕ7Ô9KÔLØ×Ñœ˜_Ó-¨qÖ1r#   rN   N)rO   rP   rQ   rR   ri   rá   rS   rT   rU   s   @r    rÚ   rÚ   6  s   ø‡ € ñ÷2ð 2r#   rÚ   c                   óB   a € ] tR tRt o RtR tR tR tR tR t	Rt
V tR	# )
ÚInsensitiveDictTestsiM  z$
Tests for L{util.InsensitiveDict}.
c                ó(  € \         P                  ! 4       pV P                  \        V\        4      4       V P                  \        V\
        4      4       V P                  \        V\        4      4       V P                  \        V\        4      4       R# )z>
L{util.InsensitiveDict} implements L{typing.MutableMapping}.
N)	r   ÚInsensitiveDictr%   Ú
isinstancer   r   r   r)   r   )r   Údcts   & r    Útest_abcÚInsensitiveDictTests.test_abcR  s`   € ô ×"Ò"Ó$ˆØ�‰œ
 3¬Ó1Ô2Ø�‰œ
 3¬Ó0Ô1Ø�‰œ
 3¬Ó7Ô8Ø×Ñœ C¬Ó2Ö3r#   c           	     ó4  € \         P                  ! RR^^R^^//^R7      pV P                  VR,          ^^/4       V P                  VR,          R4       V P                  VP                  4       V4       V P                  VR,          VP	                  R4      4       V P                  ^V4       V P                  RV4       \        \        V4      RVR\         P                  /4      pV P                  W!4       . R	OpV FJ  pV P                  WAP                  4       4       V P                  WAV,          3VP                  4       4       KL  	  V P                  \        V4      \        V4      4       V^ VR V P                  VP                  4       R.4       R# )
zZ
L{util.InsensitiveDict} preserves the case of keys if constructed with
C{preserve=True}.
r_   r°   Úfnz©Úpreserver^   ré   rç   N)r_   rí   r   )r   rç   r   ÚcopyÚgetr™   ÚevalÚreprÚkeysÚitemsr˜   )r   ré   Úresultrô   rª   s   &    r    Útest_preserveÚ"InsensitiveDictTests.test_preserve\  sS  € ô
 ×"Ò" E¨5°!°Q¸ÀÀ1¸vÐ#FÐQRÔSˆØ×Ñ˜˜U� a¨ VÔ,Ø×Ñ˜˜U� UÔ+Ø×Ñ˜Ÿ™› SÔ)Ø×Ñ˜˜U� S§W¡W¨U£^Ô4Ø�‰�a˜ÔØ�‰�e˜SÔ!äÜ�‹Ià�sØ!¤4×#7Ñ#7ðó
ˆð 	×Ñ˜Ô%â ˆÛˆAØ�M‰M˜!ŸX™X›ZÔ(Ø�M‰M˜1 !�f˜+ s§y¡y£{Ö3ñ ð 	×Ñœ˜T›¤C¨£HÔ-Ø�ˆFØ�ˆJØ×Ñ˜Ÿ™› e WÖ-r#   c           	     ó„  € \         P                  ! RR^^R^^//^ R7      p. ROpV FJ  pV P                  W1P                  4       4       V P                  W1V,          3VP	                  4       4       KL  	  V P                  \        V4      \        V4      4       V^ VR V P                  VP                  4       R.4       R# )zd
L{util.InsensitiveDict} does not preserves the case of keys if
constructed with C{preserve=False}.
r_   r°   rí   rî   r^   N)r^   rí   r   )r   rç   r™   rô   rõ   r   r˜   )r   ré   rô   rª   s   &   r    Útest_noPreserveÚ$InsensitiveDictTests.test_noPreserve{  s£   € ô
 ×"Ò" E¨5°!°Q¸ÀÀ1¸vÐ#FÐQRÔSˆÚ ˆÛˆAØ�M‰M˜!ŸX™X›ZÔ(Ø�M‰M˜1 !�f˜+ s§y¡y£{Ö3ñ ð 	×Ñœ˜T›¤C¨£HÔ-Ø�ˆFØ�ˆJØ×Ñ˜Ÿ™› e WÖ-r#   c                ó²   € \         P                  ! RR7      p^VR&   V P                  VR,          ^4       V P                  VP                  4       R.4       R# )z$
Unicode keys are case insensitive.
Frî   r_   ÚFOOr^   N©r   rç   r   rô   ©r   r­   s   & r    Útest_unicodeÚ!InsensitiveDictTests.test_unicodeŠ  sI   € ô × Ò ¨%Ô0ˆØˆˆ%‰Ø×Ñ˜˜5� 1Ô%Ø×Ñ˜Ÿ™› E 7Ö+r#   c                ó²   € \         P                  ! RR7      p^VR&   V P                  VR,          ^4       V P                  VP                  4       R.4       R# )z"
Bytes keys are case insensitive.
Frî   s   Foos   FOOs   fooNrþ   rÿ   s   & r    Ú
test_bytesÚInsensitiveDictTests.test_bytes“  sI   € ô × Ò ¨%Ô0ˆØˆˆ&‰	Ø×Ñ˜˜6� AÔ&Ø×Ñ˜Ÿ™› F 8Ö,r#   rN   N)rO   rP   rQ   rR   ri   rê   r÷   rú   r   r  rS   rT   rU   s   @r    rå   rå   M  s(   ø‡ € ñò4ò.ò>.ò,÷-ð -r#   rå   c                   ó6   a € ] tR tRt o RtR tR tR tRtV t	R# )ÚPasswordTestingProcessProtocoli�  z†
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                óJ   € . V n         V P                  P                  R 4       R# )s   secret
N)ÚoutputÚ	transportÚwriter+   s   &r    ÚconnectionMadeÚ-PasswordTestingProcessProtocol.connectionMade£  s   € ØˆŒØ�‰×Ñ˜[Ö)r#   c                ó>   € V P                   P                  W34       R # r¦   )r  r…   )r   Úfdr  s   &&&r    ÚchildDataReceivedÚ0PasswordTestingProcessProtocol.childDataReceived§  s   € Ø�‰×Ñ˜B˜<Ö(r#   c                óR   € V P                   P                  WP                  34       R # r¦   )ÚfinishedÚcallbackr  )r   Úreasons   &&r    ÚprocessEndedÚ+PasswordTestingProcessProtocol.processEndedª  s   € Ø�‰×Ñ ¯©Ð4Ö5r#   )r  N)
rO   rP   rQ   rR   ri   r  r  r  rS   rT   rU   s   @r    r  r  �  s   ø‡ € ñò
*ò)÷6ð 6r#   r  z,Process support required to test getPasswordc                   ó&   a € ] tR tRt o R tRtV tR# )ÚGetPasswordTestsi®  c           	     ó:  a € \        4       p\        4       Vn        \        P                  ! V\
        \
        RR.R\        P                  P                  \        P                  4      P                  R4      /R7       V 3R lpVP                  P                  V4      # )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                 ó^   <€ V w  rVP                  \        4       SP                  RV4       R# )r   N)r   s   secret)Útrapr	   r™   )rö   r  r  r   s   &  €r    ÚprocessFinishedÚ4GetPasswordTests.test_stdin.<locals>.processFinishedÌ  s%   ø€ Ø%ÑˆVØ�K‰KœÔ$Ø�M‰M˜.¨&Ö1r#   )r  r   r  r   ÚspawnProcessÚpyExer8   ÚpathsepÚjoinÚsysÚpathÚencodeÚaddCallback)r   Úpr  s   f  r    Ú
test_stdinÚGetPasswordTests.test_stdin³  s|   ø€ ô +Ó,ˆÜ“ZˆŒ
Ü×ÒØÜäØð,ð		ð ¤§
¡
§¡´·±Ó 9× @Ñ @ÀÓ HÐIõ	
õ 	2ð
 �z‰z×%Ñ% oÓ6Ð6r#   rN   N)rO   rP   rQ   rR   r)  rS   rT   rU   s   @r    r  r  ®  s   ø‡ € ÷
7ð 7r#   r  c                   ó&   a € ] tR tRt o R tRtV tR# )ÚSearchUpwardsTestsiÔ  c                óÊ  € \         P                  ! R 4       \        RR4      P                  4        \        RR4      P                  4        \        RR4      P                  4        \         P                  ! R4       \         P                  ! R4       \         P                  ! R4       \         P                  ! R4       \
        P                  ! R R	.R
R.R7      p\         P                  P                  R4      \         P                  ,           pV P                  W4       \        P                  ! R4       \
        P                  ! R R	.R
R.R7      pRpV P                  W4       R# )z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ÚsearchupwardsN)r8   ÚmakedirsÚopenÚcloseÚmkdirr   r2  r%  ÚabspathÚsepr   ÚshutilÚrmtree)r   ÚactualÚexpecteds   &  r    ÚtestSearchupwardsÚ$SearchUpwardsTests.testSearchupwardsÕ  s  € Ü
�ŠÐ)Ô*ÜÐ$ cÓ*×0Ñ0Ô2ÜÐ&¨Ó,×2Ñ2Ô4ÜÐ*¨CÓ0×6Ñ6Ô8Ü
�ŠÐ$Ô%Ü
�ŠÐ$Ô%Ü
�ŠÐ&Ô'Ü
�ŠÐ(Ô)Ü×#Ò#Ø!¨)¨¸EÀ5¸>ô
ˆô —7‘7—?‘? ?Ó3´b·f±fÕ<ˆØ×Ñ˜Ô*Ü�Š�oÔ&Ü×#Ò#Ø!¨)¨¸EÀ5¸>ô
ˆð ˆØ×Ñ˜Ö*r#   rN   N)rO   rP   rQ   rR   r=  rS   rT   rU   s   @r    r,  r,  Ô  s   ø‡ € ÷+ð +r#   r,  c                   óD   a € ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
ÚIntervalDifferentialTestsië  c                ó    € \        \        P                  ! . ^
4      4      p\        ^d4       F  pV P	                  \        V4      R4       K   	  R# )r³   N©r³   N©Úiterr   ÚIntervalDifferentialÚranger   Únext©r   r­   Úis   &  r    ÚtestDefaultÚ%IntervalDifferentialTests.testDefaultì  s;   € Ü”×*Ò*¨2¨rÓ2Ó3ˆÜ�s–ˆAØ×ÑœT !›W jÖ1ó r#   c                ó¢   € \        \        P                  ! ^.^
4      4      p\        ^d4       F  pV P	                  \        V4      R4       K   	  R# )é   N©rM  é    rC  rH  s   &  r    Ú
testSingleÚ$IntervalDifferentialTests.testSingleñ  s=   € Ü”×*Ò*¨A¨3°Ó3Ó4ˆÜ�s–ˆAØ×ÑœT !›W fÖ-ó r#   c                óú  € \        \        P                  ! ^^.^
4      4      p\        ^d4       EFH  pV P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R	4       V P	                  \        V4      R
4       V P	                  \        V4      R4       V P	                  \        V4      R4       EKK  	  R# )rM  NrN  ©r   r   ©r   rO  )r   r   ©r   rO  ©r   r   ©r   rO  )r   r   ©r   rO  ©rO  r   rC  rH  s   &  r    ÚtestPairÚ"IntervalDifferentialTests.testPairö  s  € Ü”×*Ò*¨A¨q¨6°2Ó6Ó7ˆÜ�s—ˆAØ×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W f×-ó r#   c                ót  € \        \        P                  ! . RO^
4      4      p\        ^d4       EF  pV P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       V P	                  \        V4      R4       EK  	  R# )r   N)r   r   rM  rX  rY  )r   r   rU  )rO  r   rC  rH  s   &  r    Ú
testTripleÚ$IntervalDifferentialTests.testTriple  s£  € Ü”×*Ò*ª9°bÓ9Ó:ˆÜ�s—ˆAØ×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W fÔ-Ø×ÑœT !›W f×-ó' r#   c                óp  € \        \        P                  ! . ^
4      4      pV P                  \	        V4      R4       VP                  ^4       V P                  \	        V4      R4       V P                  \	        V4      R4       VP                  ^4       V P                  \	        V4      R4       V P                  \	        V4      R4       V P                  \	        V4      R4       V P                  \	        V4      R4       V P                  \	        V4      R4       V P                  \	        V4      R4       R# )r³   NrB  rT  rY  )rD  r   rE  r   rG  ÚaddIntervalrÿ   s   & r    Ú
testInsertÚ$IntervalDifferentialTests.testInsert  så   € Ü”×*Ò*¨2¨rÓ2Ó3ˆØ×Ñœ˜a› *Ô-Ø	�‰�aÔØ×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø	�‰�aÔØ×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ö)r#   c                ó  € \        \        P                  ! ^^.^
4      4      pV P                  \	        V4      R4       V P                  \	        V4      R4       V P                  \	        V4      R4       VP                  ^4       V P                  \	        V4      R4       V P                  \	        V4      R4       VP                  ^4       V P                  \	        V4      R4       V P                  \        VP
                  ^
4       R# )r   NrT  rS  rU  rW  rN  rB  )rD  r   rE  r   rG  ÚremoveIntervalÚassertRaisesÚ
ValueErrorrÿ   s   & r    Ú
testRemoveÚ$IntervalDifferentialTests.testRemove+  sÉ   € Ü”×*Ò*¨A¨q¨6°2Ó6Ó7ˆØ×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø	×Ñ˜ÔØ×Ñœ˜a› &Ô)Ø×Ñœ˜a› &Ô)Ø	×Ñ˜ÔØ×Ñœ˜a› *Ô-Ø×Ñœ* a×&6Ñ&6¸Ö;r#   rN   N)rO   rP   rQ   rR   rJ  rP  rZ  r]  ra  rg  rS   rT   rU   s   @r    r@  r@  ë  s(   ø‡ € ò2ò
.ò
.ò .ò.*÷
<ð 
<r#   r@  c                   ó.   a € ] tR tRt o RtRtR tRtV tR# )ÚRecordi8  z0
Trivial user of L{FancyEqMixin} used by tests.
c                ó   € Wn         W n        R # r¦   ©r   rs   ©r   r   rs   s   &&&r    Ú__init__ÚRecord.__init__?  ó   € ØŒØŽr#   rl  N©	rO   rP   rQ   rR   ri   ÚcompareAttributesrn  rS   rT   rU   s   @r    rj  rj  8  ó   ø‡ € ñð #Ð÷ð r#   rj  c                   ó.   a € ] tR tRt o RtRtR tRtV tR# )ÚDifferentRecordiD  zD
Trivial user of L{FancyEqMixin} which is not related to L{Record}.
c                ó   € Wn         W n        R # r¦   rl  rm  s   &&&r    rn  ÚDifferentRecord.__init__K  rp  r#   rl  Nrq  rU   s   @r    ru  ru  D  rs  r#   ru  c                   ó   € ] tR tRtRtRtR# )ÚDerivedRecordiP  z8
A class with an inheritance relationship to L{Record}.
rN   N)rO   rP   rQ   rR   ri   rS   rN   r#   r    ry  ry  P  s   † õr#   ry  c                   ó6   a € ] tR tRt o RtV 3R lR ltRtV tR# )ÚEqualToEverythingiV  zI
A class the instances of which consider themselves equal to everything.
c                ó&   <€ V ^8„  d   QhRS[ RS[/# ©r   ÚotherÚreturn©r´   Úbool)ÚformatrV   s   "€r    Ú__annotate__ÚEqualToEverything.__annotate__[  s   ø€ ÷ ñ ™Fð ¡tñ r#   c                ó   € R # )TrN   ©r   r~  s   &&r    Ú__eq__ÚEqualToEverything.__eq__[  s   € Ùr#   rN   N©rO   rP   rQ   rR   ri   r‡  rS   rT   rU   s   @r    r{  r{  V  s   ø‡ € ñ÷ö r#   r{  c                   ó6   a € ] tR tRt o RtV 3R lR ltRtV tR# )ÚEqualToNothingi_  zF
A class the instances of which consider themselves equal to nothing.
c                ó&   <€ V ^8„  d   QhRS[ RS[/# r}  r€  )r‚  rV   s   "€r    rƒ  ÚEqualToNothing.__annotate__d  s   ø€ ÷ ñ ™Fð ¡tñ r#   c                ó   € R # )FrN   r†  s   &&r    r‡  ÚEqualToNothing.__eq__d  s   € Ùr#   rN   Nr‰  rU   s   @r    r‹  r‹  _  s   ø‡ € ñ÷ö r#   r‹  c                   óZ   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tRtV tR# )ÚEqualityTestsih  z
Tests for L{FancyEqMixin}.
c                ó
  €  ! R R\         P                  4      pV P                  V! 4       V! 4       8H  4       V P                  V! 4       V! 4       8g  4       V! 4       pV P                  W"8H  4       V P                  W"8g  4       R# )zu
Instances of a class which mixes in L{FancyEqMixin} but which
defines no comparison attributes compare by identity.
c                   ó   € ] tR tRtRtR# )Ú*EqualityTests.test_identity.<locals>.Emptyis  rN   N)rO   rP   rQ   rR   rS   rN   r#   r    ÚEmptyr”  s  s   † Ûr#   r•  N)r   ÚFancyEqMixinr)   r%   )r   r•  Úemptys   &  r    Útest_identityÚEqualityTests.test_identitym  sg   € ô	”D×%Ñ%ô 	ð 	×Ñ™›¡E£GÑ+Ô,Ø�‰™›¡5£7Ñ*Ô+Ù“ˆØ�‰˜™Ô'Ø×Ñ˜™Ö(r#   c                óF  € V P                  \        ^^4      \        ^^4      8H  4       V P                  \        ^^4      \        ^^4      8H  4       V P                  \        ^^4      \        ^^4      8H  4       V P                  \        ^^4      \        ^^4      8H  4       R# )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.
N)r%   rj  r)   r+   s   &r    Útest_equalityÚEqualityTests.test_equality|  s~   € ð 	�‰œ˜q !›¬¨q°!«Ñ4Ô5Ø×Ñœ  1›¬°°1«Ñ5Ô6Ø×Ñœ  1›¬°°1«Ñ5Ô6Ø×Ñœ  1›¬°°1«Ñ5Ö6r#   c                óF  € V P                  \        ^^4      \        ^^4      8g  4       V P                  \        ^^4      \        ^^4      8g  4       V P                  \        ^^4      \        ^^4      8g  4       V P                  \        ^^4      \        ^^4      8g  4       R# )zg
Inequality between instances of a particular L{record} should be
defined as the negation of equality.
N)r)   rj  r%   r+   s   &r    Útest_unequalityÚEqualityTests.test_unequality‡  sz   € ð
 	×Ñœ  1›¬°°1«Ñ5Ô6Ø�‰œ˜q !›¬¨q°!«Ñ4Ô5Ø�‰œ˜q !›¬¨q°!«Ñ4Ô5Ø�‰œ˜q !›¬¨q°!«Ñ4Ö5r#   c                óV   € V P                  \        ^^4      \        ^^4      8H  4       R# )zW
Instances of different classes which mix in L{FancyEqMixin} should not
compare equal.
N)r)   rj  ru  r+   s   &r    Útest_differentClassesEqualityÚ+EqualityTests.test_differentClassesEquality‘  s$   € ð
 	×Ñœ  1›¬¸¸AÓ)>Ñ>Ö?r#   c                óV   € V P                  \        ^^4      \        ^^4      8g  4       R# )zU
Instances of different classes which mix in L{FancyEqMixin} should
compare unequal.
N)r%   rj  ru  r+   s   &r    Útest_differentClassesInequalityÚ-EqualityTests.test_differentClassesInequality˜  s"   € ð
 	�‰œ˜q !›¬¸¸1Ó(=Ñ=Ö>r#   c                óF  € V P                  \        ^^4      \        ^^4      8H  4       V P                  \        ^^4      \        ^^4      8H  4       V P                  \        ^^4      \        ^^4      8H  4       V P                  \        ^^4      \        ^^4      8H  4       R# )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.
N)r%   rj  ry  r)   r+   s   &r    Útest_inheritedClassesEqualityÚ+EqualityTests.test_inheritedClassesEqualityŸ  s‚   € ð 	�‰œ˜q !›¬°a¸Ó(;Ñ;Ô<Ø×Ñœ  1›¬°q¸!Ó)<Ñ<Ô=Ø×Ñœ  1›¬°q¸!Ó)<Ñ<Ô=Ø×Ñœ  1›¬°q¸!Ó)<Ñ<Ö=r#   c                óF  € V P                  \        ^^4      \        ^^4      8g  4       V P                  \        ^^4      \        ^^4      8g  4       V P                  \        ^^4      \        ^^4      8g  4       V P                  \        ^^4      \        ^^4      8g  4       R# )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.
N)r)   rj  ry  r%   r+   s   &r    Útest_inheritedClassesInequalityÚ-EqualityTests.test_inheritedClassesInequalityª  s~   € ð 	×Ñœ  1›¬°q¸!Ó)<Ñ<Ô=Ø�‰œ˜q !›¬°a¸Ó(;Ñ;Ô<Ø�‰œ˜q !›¬°a¸Ó(;Ñ;Ô<Ø�‰œ˜q !›¬°a¸Ó(;Ñ;Ö<r#   c                óž   € V P                  \        ^^4      \        4       8H  4       V P                  \        ^^4      \	        4       8H  4       R# )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.
N)r%   rj  r{  r)   r‹  r+   s   &r    Ú(test_rightHandArgumentImplementsEqualityÚ6EqualityTests.test_rightHandArgumentImplementsEqualityµ  s;   € ð 	�‰œ˜q !›Ô(9Ó(;Ñ;Ô<Ø×Ñœ  1›¬Ó)9Ñ9Ö:r#   c                óž   € V P                  \        ^^4      \        4       8g  4       V P                  \        ^^4      \	        4       8g  4       R# )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.
N)r)   rj  r{  r%   r‹  r+   s   &r    Ú*test_rightHandArgumentImplementsUnequalityÚ8EqualityTests.test_rightHandArgumentImplementsUnequality¿  s;   € ð 	×Ñœ  1›Ô):Ó)<Ñ<Ô=Ø�‰œ˜q !›¬Ó(8Ñ8Ö9r#   rN   N)rO   rP   rQ   rR   ri   r˜  r›  rž  r¡  r¤  r§  rª  r­  r°  rS   rT   rU   s   @r    r‘  r‘  h  s=   ø‡ € ñò)ò	7ò6ò@ò?ò	>ò	=ò;÷:ð :r#   r‘  rž   zgeteuid/seteuid not availablec                   ó`   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tRtV tR# )ÚRunAsEffectiveUserTestsiÊ  z3
Test for the L{util.runAsEffectiveUser} function.
c                ó|  € \        4       V n        V P                  \        R V P                  P                  4       V P                  \        RV P                  P
                  4       V P                  \        RV P                  P                  4       V P                  \        RV P                  P                  4       R# )rž   ÚgetegidÚseteuidÚsetegidN)r   r   r€   r8   rž   rµ  r¶  r·  r+   s   &r    r‚   ÚRunAsEffectiveUserTests.setUpÐ  ss   € Ü“hˆŒØ�
‰
”2�y $§+¡+×"5Ñ"5Ô6Ø�
‰
”2�y $§+¡+×"5Ñ"5Ô6Ø�
‰
”2�y $§+¡+×"5Ñ"5Ô6Ø�
‰
”2�y $§+¡+×"5Ñ"5Ö6r#   c                óî   € T P                  W18H  ;'       g     W0P                  P                  R,          8H  4       T P                  WB8H  ;'       g     W@P                  P                  R,          8H  4       R# )z6
Check if wanted UID/GID matched start or saved ones.
Néÿÿÿÿ)r%   r   r’   ÚsetegidCalls)r   ÚstartUIDÚstartGIDÚwantUIDÚwantGIDs   &&&&&r    Ú_securedFunctionÚ(RunAsEffectiveUserTests._securedFunction×  sX   € ð 	�‰˜Ñ+×VÐV¨w¿+¹+×:RÑ:RÐSUÕ:VÑ/VÔWØ�‰˜Ñ+×VÐV¨w¿+¹+×:RÑ:RÐSUÕ:VÑ/VÖWr#   c                ó\   € \         P                  ! ^ ^ R 4      pV P                  V^4       R# )zW
L{util.runAsEffectiveUser} forwards the result obtained by calling the
given function
c                  ó   € ^# )r   rN   rN   r#   r    Ú<lambda>Ú<RunAsEffectiveUserTests.test_forwardResult.<locals>.<lambda>ã  s   € ±qr#   N©r   ÚrunAsEffectiveUserr   ©r   rö   s   & r    Útest_forwardResultÚ*RunAsEffectiveUserTests.test_forwardResultÞ  s(   € ô
 ×(Ò(¨¨A©yÓ9ˆØ×Ñ˜ Ö#r#   c                ó^   € \         P                  ! ^ ^ R ^4      pV P                  V^4       R# )zM
L{util.runAsEffectiveUser} pass the given parameters to the given
function.
c                 ó   € ^V ,          # )r   rN   )rª   s   &r    rÄ  Ú=RunAsEffectiveUserTests.test_takeParameters.<locals>.<lambda>ë  s   € ¸¸Q¾r#   NrÆ  rÈ  s   & r    Útest_takeParametersÚ+RunAsEffectiveUserTests.test_takeParametersæ  s*   € ô
 ×(Ò(¨¨A©ÀÓBˆØ×Ñ˜ Ö#r#   c                óf   € \         P                  ! ^ ^ RR l^^R7      pV P                  V^4       R# )zO
L{util.runAsEffectiveUser} pass the keyword parameters to the given
function.
c                 ó    € W,          V,          # r¦   rN   )rª   r«   Úzs   &&&r    rÄ  ÚDRunAsEffectiveUserTests.test_takesKeyworkArguments.<locals>.<lambda>ó  s
   € À1Å5È1Æ9r#   )rÒ  NrV  rÆ  rÈ  s   & r    Útest_takesKeyworkArgumentsÚ2RunAsEffectiveUserTests.test_takesKeyworkArgumentsî  s.   € ô
 ×(Ò(¨¨AÓ/LÈaÐSTÔUˆØ×Ñ˜ Ö#r#   c           	     ón  € WP                   n        W P                   n        \        P                  ! VVV P
                  VVVV4       V P                  V P                   P                  V4       V P                  V P                   P                  V4       . V P                   n        . V P                   n        R# )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)	r   rŸ   Úegidr   rÇ  rÀ  r   r’   r»  )r   r¼  r½  r¾  r¿  ÚexpectedUIDSwitchesÚexpectedGIDSwitchess   &&&&&&&r    Ú_testUIDGIDSwitchÚ)RunAsEffectiveUserTests._testUIDGIDSwitchö  s‘   € ð $�‰ÔØ#�‰ÔÜ×ÒØØØ×!Ñ!ØØØØô	
ð 	×Ñ˜Ÿ™×1Ñ1Ð3FÔGØ×Ñ˜Ÿ™×1Ñ1Ð3FÔGØ#%ˆ�‰Ô Ø#%ˆ�‰Ö r#   c           	     óÆ   € V P                  ^ ^ ^ ^ . . 4       V P                  ^ ^ ^^ ^^ .. 4       V P                  ^ ^ ^ ^. ^^ .4       V P                  ^ ^ ^^^^ .^^ .4       R# )z<
Check UID/GID switches when current effective UID is root.
N©rÚ  r+   s   &r    Ú	test_rootÚ!RunAsEffectiveUserTests.test_root  st   € ð 	×Ñ˜q ! Q¨¨2¨rÔ2Ø×Ñ˜q ! Q¨¨A¨q¨6°2Ô6Ø×Ñ˜q ! Q¨¨2°°1¨vÔ6Ø×Ñ˜q ! Q¨¨A¨q¨6°A°q°6Ö:r#   c           	     óÊ   € V P                  ^^ ^ ^ ^ ^.. 4       V P                  ^^ ^^ . . 4       V P                  ^^ ^^. RO^^ .4       V P                  ^^ ^^. RO^^ .4       R# )z@
Check UID/GID switches when current effective UID is non-root.
N©rO  r   rO  r   ©rO  r   rO  r   rÝ  r+   s   &r    Útest_UIDÚ RunAsEffectiveUserTests.test_UID  sp   € ð 	×Ñ˜q ! Q¨¨A¨q¨6°2Ô6Ø×Ñ˜q ! Q¨¨2¨rÔ2Ø×Ñ˜q ! Q¨ª<¸!¸Q¸Ô@Ø×Ñ˜q ! Q¨ª<¸!¸Q¸Ö@r#   c           	     óÆ   € V P                  ^ ^^ ^ . ^ ^.4       V P                  ^ ^^ ^. . 4       V P                  ^ ^^^^^ .. 4       V P                  ^ ^^^^^ .^^.4       R# )z@
Check UID/GID switches when current effective GID is non-root.
NrÝ  r+   s   &r    Útest_GIDÚ RunAsEffectiveUserTests.test_GID&  st   € ð 	×Ñ˜q ! Q¨¨2°°1¨vÔ6Ø×Ñ˜q ! Q¨¨2¨rÔ2Ø×Ñ˜q ! Q¨¨A¨q¨6°2Ô6Ø×Ñ˜q ! Q¨¨A¨q¨6°A°q°6Ö:r#   c           	     ób  € V P                  ^^^ ^ ^ ^.^ ^.4       V P                  ^^^ ^^ ^.. 4       V P                  ^^^^ . RO^ ^.4       V P                  ^^^^. . 4       V P                  ^^^^. RO. 4       V P                  ^^^^. RO^^.4       V P                  ^^^^. RO^^.4       R# )zD
Check UID/GID switches when current effective UID/GID is non-root.
Nrá  râ  rÝ  r+   s   &r    Útest_UIDGIDÚ#RunAsEffectiveUserTests.test_UIDGID/  sÄ   € ð 	×Ñ˜q ! Q¨¨A¨q¨6°A°q°6Ô:Ø×Ñ˜q ! Q¨¨A¨q¨6°2Ô6Ø×Ñ˜q ! Q¨ª<¸!¸Q¸Ô@Ø×Ñ˜q ! Q¨¨2¨rÔ2Ø×Ñ˜q ! Q¨ª<¸Ô<Ø×Ñ˜q ! Q¨ª<¸!¸Q¸Ô@Ø×Ñ˜q ! Q¨ª<¸!¸Q¸Ö@r#   )r   N)rO   rP   rQ   rR   ri   r‚   rÀ  rÉ  rÎ  rÔ  rÚ  rÞ  rã  ræ  ré  rS   rT   rU   s   @r    r³  r³  Ê  sE   ø‡ € ñò7òXò$ò$ò$ò&ò<;òAò;÷
Að 
Ar#   r³  z.stdlib support for initgroups is not availablec                   ó0   a € ] tR tRt o RtR tR tRtV tR# )ÚInitGroupsTestsi<  z
Tests for L{util.initgroups}.
c                óŒ  a€ . oV3R lpV P                  \        RV4       . pV P                  \        RVP                  4       \        P                  ! \        P
                  ! 4       ^4       V P                  S\        P                  \        P
                  ! 4       4      P                  ^3.4       V P                  V4       R# )zK
Calling L{util.initgroups} will call the underlying stdlib
implmentation.
c                 ó,   <€ SP                  W34       R # r¦   )r…   )rª   r«   rn   s   &&€r    ÚmockInitgroupsÚ?InitGroupsTests.test_initgroupsInStdlib.<locals>.mockInitgroupsI  s   ø€ Ø�L‰L˜!˜Ö r#   Ú_initgroupsÚ	setgroupsN)r€   r   r…   r~   r8   r9   r   r6   r7   r:   r)   )r   rï  ÚsetgroupsCallsrn   s   &  @r    Útest_initgroupsInStdlibÚ'InitGroupsTests.test_initgroupsInStdlibB  s‹   ø€ ð
 ˆõ	!ð 	�
‰
”4˜¨Ô7ØˆØ�
‰
”4˜ n×&;Ñ&;Ô<ä�ŠœŸ	š	› QÔ'Ø×Ñ˜¤#§,¡,¬r¯yªy«{Ó";×"CÑ"CÀQÐ!GÐ HÔIØ×Ñ˜Ö(r#   c                óx   € V P                  \        \        P                  \        P
                  ! 4       R4       R# )z>
Calling L{util.initgroups} with None for gid gives an error.
N)re  r*   r   r~   r8   r9   r+   s   &r    Útest_initgroupsNoneGidÚ&InitGroupsTests.test_initgroupsNoneGidT  s"   € ð 	×Ñœ)¤T§_¡_´b·i²i³kÀ4ÖHr#   rN   N)	rO   rP   rQ   rR   ri   rô  r÷  rS   rT   rU   s   @r    rì  rì  <  s   ø‡ € ñò)÷$Ið Ir#   rì  c                   óP   a € ] tR tRt o RtR tR t]! ]RR7      .]n	        Rt
V tR# )	ÚDeprecationTestsi[  z3
Tests for deprecations in C{twisted.python.util}.
c                ó(  € \         P                  ! 4        V P                  V P                  .R7      pV P	                  V^ ,          R,          R4       V P	                  V^ ,          R,          \
        4       V P	                  \        V4      ^4       R# )z&
L{util.getPluginDirs} is deprecated.
rÝ   r–   zCtwisted.python.util.getPluginDirs is deprecated since Twisted 12.2.rß   N)r   ÚgetPluginDirsr—   Útest_getPluginDirsr   râ   r˜   ©r   rš   s   & r    rý  Ú#DeprecationTests.test_getPluginDirs`  sƒ   € ô 	×ÒÔØ×,Ñ,Ø $× 7Ñ 7Ð8ð -ó 
ˆð 	×ÑØ˜AÕ˜yÕ)ØTô	
ð 	×Ñ˜¨Õ+¨JÕ7Ô9KÔLØ×Ñœ˜_Ó-¨qÖ1r#   c                ó(  € \         P                  ! 4        V P                  V P                  .R7      pV P	                  V^ ,          R,          R4       V P	                  V^ ,          R,          \
        4       V P	                  \        V4      ^4       R# )z%
L{util.addPluginDir} is deprecated.
rÝ   r–   zBtwisted.python.util.addPluginDir is deprecated since Twisted 12.2.rß   N)r   ÚaddPluginDirr—   Útest_addPluginDirr   râ   r˜   rþ  s   & r    r  Ú"DeprecationTests.test_addPluginDiro  sƒ   € ô 	×ÒÔØ×,Ñ,Ø $× 6Ñ 6Ð7ð -ó 
ˆð 	×ÑØ˜AÕ˜yÕ)ØSô	
ð 	×Ñ˜¨Õ+¨JÕ7Ô9KÔLØ×Ñœ˜_Ó-¨qÖ1r#   z/twisted.python.util.getPluginDirs is deprecated)rß   r–   rN   N)rO   rP   rQ   rR   ri   rý  r  ÚSUPPRESSrâ   r   rS   rT   rU   s   @r    rú  rú  [  s2   ø‡ € ñò2ò2ñ  	Ø'ØEô	
ð"Ð×Òr#   rú  c                   ó`   a € ] tR tRt o Rt]! ]P                  4      tR tR t	R t
R tRtV tR# )	ÚSuppressedWarningsTestsi†  z.
Tests for L{util.runWithWarningsSuppressed}.
c                óÚ   € R/ 3R/ 3.pV P                  V\        P                  R4       V P                  V\        P                  R4       V P                  . V P	                  4       4       R# )zv
Warnings from the function called by C{runWithWarningsSuppressed} are
suppressed if they match the passed in filter.
ú
ignore fooz
ignore barN©Úignorez.*foo.*©r
  z.*bar.*©ÚrunWithWarningsSuppressedÚwarningsÚwarnr   r—   )r   Úfilterss   & r    Ú&test_runWithWarningsSuppressedFilteredÚ>SuppressedWarningsTests.test_runWithWarningsSuppressedFiltered�  s^   € ð
 *¨2Ð.Ð1FÈÐ0KÐLˆØ×&Ñ& w´·±¸|ÔLØ×&Ñ& w´·±¸|ÔLØ×Ñ˜˜T×/Ñ/Ó1Ö2r#   c                óÐ   € R/ 3R/ 3.pV P                  V\        P                  R4       T P                  R.V P	                  4        Uu. uF  q"R,          NK  	  up4       R# u upi )z�
Warnings from the function called by C{runWithWarningsSuppressed} are
not suppressed if they do not match the passed in filter.
zdon't ignorer–   Nr	  r  r  ©r   r  r.  s   &  r    Ú(test_runWithWarningsSuppressedUnfilteredÚ@SuppressedWarningsTests.test_runWithWarningsSuppressedUnfiltered—  sc   € ð
 *¨2Ð.Ð1FÈÐ0KÐLˆØ×&Ñ& w´·±¸~ÔNØ×Ñ˜.Ð)À$×BTÑBTÔBVÓ+WÑBV¸Q¨i¯L¨LÑBVÑ+WÖXùÒ+Ws   Á	A#
c                óL   € V P                  V P                  . R 4      ^4       R# )zL
C{runWithWarningsSuppressed} returns the result of the function it
called.
c                  ó   € ^# )r   rN   rN   r#   r    rÄ  Ú:SuppressedWarningsTests.test_passThrough.<locals>.<lambda>¥  s   € ÁAr#   N)r   r  r+   s   &r    Útest_passThroughÚ(SuppressedWarningsTests.test_passThrough   s!   € ð
 	×Ñ˜×7Ñ7¸¹IÓFÈÖJr#   c                óà   € R/ 3R/ 3.pV P                  VR 4       \        P                  ! R4       T P                  R.V P	                  4        Uu. uF  q"R,          NK  	  up4       R# u upi )zS
Once C{runWithWarningsSuppressed} has returned, it no longer
suppresses warnings.
c                  ó   € R # r¦   rN   rN   r#   r    rÄ  Ú<SuppressedWarningsTests.test_noSideEffects.<locals>.<lambda>­  s   € ¹r#   r  r–   Nr	  r  r  r  s   &  r    Útest_noSideEffectsÚ*SuppressedWarningsTests.test_noSideEffects§  sh   € ð
 *¨2Ð.Ð1FÈÐ0KÐLˆØ×&Ñ& w±Ô=Ü�Š�lÔ#Ø×Ñ˜,˜À×@RÑ@RÔ@TÓ)UÑ@T¸1¨I¯,¨,Ñ@TÑ)UÖVùÒ)Us   ÁA+
rN   N)rO   rP   rQ   rR   ri   Ústaticmethodr   r  r  r  r  r  rS   rT   rU   s   @r    r  r  †  s:   ø‡ € ññ !-¨T×-KÑ-KÓ LÐò3òYòK÷Wð Wr#   r  c                   óB   a € ] tR tRt o RtR tR tR tR tR t	Rt
V tR	# )
ÚFancyStrMixinTestsi²  z"
Tests for L{util.FancyStrMixin}.
c                óx   €  ! R R\         P                  4      pV P                  \        V! 4       4      R4       R# )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                   ó"   € ] tR tRtRt^tRtRtR# )Ú6FancyStrMixinTests.test_sequenceOfStrings.<locals>.Fooi½  ÚhellorN   N©ÚfirstÚsecond©rO   rP   rQ   rR   ÚshowAttributesr)  r*  rS   rN   r#   r    r_   r&  ½  ó   † Ø0ˆNØˆEØŒFr#   r_   z<Foo first=1 second='hello'>N©r   ÚFancyStrMixinr   Ústr©r   r_   s   & r    Útest_sequenceOfStringsÚ)FancyStrMixinTests.test_sequenceOfStrings·  s-   € ô	”$×$Ñ$ô 	ð
 	×Ñœ™S›U›Ð%CÖDr#   c                óx   €  ! R R\         P                  4      pV P                  R\        V! 4       4      4       R# )zÝ
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                   ó,   € ] tR tRtRRR 33tRtRtRtR# )	Ú.FancyStrMixinTests.test_formatter.<locals>.FooiÌ  r)  r*  c                ó,   € \        V R R R1,          4      # )Nrº  )ró   )Úvalues   &r    rÄ  Ú7FancyStrMixinTests.test_formatter.<locals>.Foo.<lambda>Í  s   € ÄÀUÉ4ÈRÈ4Å[Ô@Qr#   r'  ÚworldrN   Nr+  rN   r#   r    r_   r6  Ì  s   † Ø%¨Ñ2QÐ'RÐSˆNØˆEØŒFr#   r_   z"<Foo first='hello' second='dlrow'>Nr.  r1  s   & r    Útest_formatterÚ!FancyStrMixinTests.test_formatterÄ  s-   € ô	”$×$Ñ$ô 	ð
 	×ÑÐ=¼sÁ3Ã5»zÖJr#   c                óx   €  ! R R\         P                  4      pV P                  \        V! 4       4      R4       R# )zþ
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                   ó"   € ] tR tRtRt^tRtRtR# )Ú-FancyStrMixinTests.test_override.<locals>.FooiÛ  gÙÎ÷Sã @rN   N)r)  )r*  Ú2ndz%.1fr+  rN   r#   r    r_   r?  Û  s   † ØAˆNØˆEØŒFr#   r_   z<Foo first=1 2nd=2.1>Nr.  r1  s   & r    Útest_overrideÚ FancyStrMixinTests.test_overrideÓ  s-   € ô	”$×$Ñ$ô 	ð
 	×Ñœ™S›U›Ð%<Ö=r#   c                óx   €  ! R R\         P                  4      pV P                  \        V! 4       4      R4       R# )zO
If C{fancybasename} is present, C{__str__} uses it instead of the class name.
c                   ó   € ] tR tRtRtRtR# )Ú2FancyStrMixinTests.test_fancybasename.<locals>.Fooiç  ÚBarrN   N)rO   rP   rQ   rR   ÚfancybasenamerS   rN   r#   r    r_   rE  ç  s   † Ø!ŒMr#   r_   z<Bar>Nr.  r1  s   & r    Útest_fancybasenameÚ%FancyStrMixinTests.test_fancybasenameâ  s,   € ô
	"”$×$Ñ$ô 	"ð 	×Ñœ™S›U› WÖ-r#   c                óŽ   €  ! R R\         P                  4      pV! 4       pV P                  \        V4      \	        V4      4       R# )z5
C{__repr__} outputs the same content as C{__str__}.
c                   ó"   € ] tR tRtRt^tRtRtR# )Ú)FancyStrMixinTests.test_repr.<locals>.Fooiñ  r'  rN   Nr(  r+  rN   r#   r    r_   rL  ñ  r-  r#   r_   N)r   r/  r   r0  ró   )r   r_   Úobjs   &  r    Ú	test_reprÚFancyStrMixinTests.test_reprì  s5   € ô
	”$×$Ñ$ô 	ñ
 ‹eˆØ×Ñœ˜S›¤4¨£9Ö-r#   rN   N)rO   rP   rQ   rR   ri   r2  r;  rA  rH  rN  rS   rT   rU   s   @r    r#  r#  ²  s*   ø‡ € ñòEòKò>ò.÷.ð .r#   r#  c                   óN   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )Ú
PadToTestsiú  z
Tests for L{util.padTo}.
c                óh   € \         P                  ! ^. 4      pV P                  R.^,          V4       R# )zM
L{None} values can be added to a list to cause it to have a certain
length.
N©r   ÚpadTor   ©r   Úpaddeds   & r    Útest_defaultÚPadToTests.test_defaultÿ  s*   € ô
 —’˜A˜rÓ"ˆØ×Ñ˜$˜ !� VÖ,r#   c                ój   € \         P                  ! ^. R4      pV P                  R.^,          V4       R# )zO
A specific value can be added to a list to cause it to have a certain
length.
rª   NrS  rU  s   & r    Útest_specificDefaultValueÚ$PadToTests.test_specificDefaultValue  s,   € ô
 —’˜A˜r 3Ó'ˆØ×Ñ˜#˜ � FÖ+r#   c                ób   € \         P                  ! ^^^.R4      pV P                  . ROV4       R# )zT
A list which already has some items has the padding value added after
those items.
rÒ  N)r   r   rÒ  rS  rU  s   & r    Útest_padNonEmptyListÚPadToTests.test_padNonEmptyList  s*   € ô
 —’˜A  1˜v sÓ+ˆØ×Ñš fÖ-r#   c                óV   € V P                  \        \        P                  ^^^.4       R# )zc
L{util.padTo} can't pad a list if the size requested is smaller than
the size of the list to pad.
N)re  rf  r   rT  r+   s   &r    Útest_padToSmallerSizeÚ PadToTests.test_padToSmallerSize  s    € ð
 	×Ñœ*¤d§j¡j°!°a¸°VÖ<r#   c                óp   € ^^.p\         P                  ! \        V4      V4      pV P                  W4       R# )zr
If the list is already the length indicated by the padding argument
then a list with the same value is returned.
N)r   rT  r˜   r   ©r   rõ   rV  s   &  r    Útest_alreadyPaddedÚPadToTests.test_alreadyPadded  s/   € ð
 �A�ˆÜ—’œC ›J¨Ó.ˆØ×Ñ˜Ö'r#   c                óp   € ^^.p\         P                  ! \        V4      V4      pV P                  W!4       R# )zs
If the list is already the length indicated by the padding argument
then the return value is a copy of the input.
N)r   rT  r˜   ÚassertIsNotrc  s   &  r    Útest_alreadyPaddedCopiesÚ#PadToTests.test_alreadyPaddedCopies'  s/   € ð
 �A�ˆÜ—’œC ›J¨Ó.ˆØ×Ñ˜Ö'r#   c                ó\   € . p\         P                  ! ^V4       V P                  . V4       R# )z?
L{util.padTo} doesn't modify the input list but makes a copy.
NrS  )r   rõ   s   & r    Útest_makeCopyÚPadToTests.test_makeCopy0  s'   € ð ˆÜ�
Š
�1�eÔØ×Ñ˜˜UÖ#r#   rN   N)rO   rP   rQ   rR   ri   rW  rZ  r]  r`  rd  rh  rk  rS   rT   rU   s   @r    rQ  rQ  ú  s2   ø‡ € ñò-ò,ò.ò=ò(ò(÷$ð $r#   rQ  )Gri   rq   Úos.pathr8   r9  r$  r  Útypingr   r   r   r   Úunittestr   rF   Ú_grpr6   Ú_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   rX   rk   Úgetattrr|   r£   rÚ   rå   r  Ú
providedByr  r,  r@  r–  rj  ru  ry  r{  r‹  r‘  r³  rñ  rì  rú  r  r#  rQ  rN   r#   r    Ú<module>r�     sc  ðñ
ó
 Û Û Û 
Û ß >Ó >Ý ðÛÛð
 €CØ
€Cå $Ý +Ý .Ý 7Ý 5Ý Ý ,Ý ,ß 5Ý 3á�—‘Ó ×-Ñ-Ó/€ô.J�ô .JôbV�xô Vô*(˜(ô (ñ> ‰G�B˜ $Ó'Ô'Ð)FÓGôCV�Xó CVó HðCVôL]' ô ]'ô@2�xô 2ô.M-˜8ô M-ô`6 _ô 6ñ" Ø×"Ò" 7Ó+Ô+Ø2óô7�xó 7ó	ð7ôD+˜ô +ô.J< ô J<ôZ	ˆT×Ñô 	ô	�d×'Ñ'ô 	ô�Fô ÷ñ ÷ñ ô_:�Hô _:ñD ‰G�B˜	 4Ó(Ô(Ð*IÓJônA˜hó nAó KðnAñb ˆD×ÑÔÐNÓOôI�hó Ió PðIô<(�xô (ôV)W˜hô )WôXE.˜ô E.ôP<$�ö <$øðK ô Ø
€CØ
ƒCðús   ªH ÈH"È!H"