+
    üÐjJ   ã                   ó²  € ^ RI t ^ RIt^ RIHt ^ RIHtHtHtHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ]P                   ! 4       '       * t ]P$                   Rt ! R	 R
4      t ! R R]4      t ! R R]]4      t ! R R]]4      t ! R R]]4      t ! R R]]4      t]! ]R4       ! R R]4      4       t]! ]R4       ! R R]]4      4       tR#   ] d    Rt L�i ; i)é    N)ÚskipIf)ÚHostnameAddressÚIPv4AddressÚIPv6AddressÚUNIXAddress)ÚnativeString)Úplatform)ÚSynchronousTestCaseÚTestCaseFTc                   ó8   a € ] tR t^t o R tR tR tR tRtV t	R# )ÚAddressTestCaseMixinc                óÆ   € V P                  V P                  4       V P                  4       8H  4       V P                  V P                  4       V P                  4       8g  4       R# )zë
Two different address instances, sharing the same properties are
considered equal by C{==} and not considered not equal by C{!=}.

Note: When applied via UNIXAddress class, this uses the same
filename for both objects being compared.
N)Ú
assertTrueÚbuildAddressÚassertFalse©Úselfs   &ÚD/usr/lib/python3/dist-packages/twisted/internet/test/test_address.pyÚtest_addressComparisonÚ+AddressTestCaseMixin.test_addressComparison   sL   € ð 	�‰˜×)Ñ)Ó+¨t×/@Ñ/@Ó/BÑBÔCØ×Ñ˜×*Ñ*Ó,°×0AÑ0AÓ0CÑCÖDó    c                óx   € V P                  4       pVR/pV P                  W P                  4       ,          4       R# )z{
C{__hash__} can be used to get a hash of an address, allowing
addresses to be used as keys in dictionaries, for instance.
TN©r   r   ©r   ÚaddrÚds   &  r   Ú	test_hashÚAddressTestCaseMixin.test_hash)   ó3   € ð
 × Ñ Ó"ˆØ�4ˆLˆØ�‰˜×+Ñ+Ó-Õ.Ö/r   c                ó†  € V P                  V P                  4       V P                  4       8H  4       V P                  V P                  4       V P                  4       8H  4       V P                  V P                  4       V P                  4       8g  4       V P                  V P                  4       V P                  4       8g  4       R# )zf
Check that comparison operators work correctly on address objects
when a different name is passed in
N)r   r   ÚbuildDifferentAddressr   r   s   &r   Útest_differentNamesComparisonÚ2AddressTestCaseMixin.test_differentNamesComparison2   s”   € ð
 	×Ñ˜×*Ñ*Ó,°×0JÑ0JÓ0LÑLÔMØ×Ñ˜×3Ñ3Ó5¸×9JÑ9JÓ9LÑLÔMà�‰˜×)Ñ)Ó+¨t×/IÑ/IÓ/KÑKÔLØ�‰˜×2Ñ2Ó4¸×8IÑ8IÓ8KÑKÖLr   c                óè   € V P                  V.4      pV P                  V^ ,          R,          \        4       V P                  V^ ,          R,          V4       V P                  \        V4      ^4       R# )zc
Assert that the a DeprecationWarning with the given message was
emitted against the given method.
ÚcategoryÚmessageN)ÚflushWarningsÚassertEqualÚDeprecationWarningÚlen)r   Ú
testMethodr&   Úwarningss   &&& r   ÚassertDeprecationsÚ'AddressTestCaseMixin.assertDeprecations=   s]   € ð
 ×%Ñ% z lÓ3ˆØ×Ñ˜ !� ZÕ0Ô2DÔEØ×Ñ˜ !� YÕ/°Ô9Ø×Ñœ˜X›¨Ö*r   © N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r"   r-   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s    ø‡ € ò	Eò0ò	M÷+ð +r   r   c                   ó   € ] tR t^HtRtRtR# )ÚIPv4AddressTestCaseMixinr/   N©)Útypeú%s)Úhostú%r©Úportz%d)r0   r1   r2   r3   ÚaddressArgSpecr4   r/   r   r   r9   r9   H   s   † ØE„Nr   r9   c                   ó4   a € ] tR t^Lt o RtRtR tR tRtV t	R# )ÚHostnameAddressTestsz#
Test case for L{HostnameAddress}.
c                ó   € \        R^ 4      # )z_
Create an arbitrary new L{HostnameAddress} instance.

@return: A L{HostnameAddress} instance.
s   example.com©r   r   s   &r   r   Ú!HostnameAddressTests.buildAddressS   ó   € ô ˜~¨qÓ1Ð1r   c                ó   € \        R^ 4      # )z_
Like L{buildAddress}, but with a different hostname.

@return: A L{HostnameAddress} instance.
s   example.netrE   r   s   &r   r!   Ú*HostnameAddressTests.buildDifferentAddress[   rG   r   r/   N))Úhostnamer<   r?   )
r0   r1   r2   r3   Ú__doc__rA   r   r!   r4   r5   r6   s   @r   rC   rC   L   s    ø‡ € ñð :€Nò2÷2ð 2r   rC   c                   ó,   a € ] tR t^dt o R tR tRtV tR# )ÚIPv4AddressTCPTestsc                ó   € \        RR^ 4      # )z’
Create an arbitrary new L{IPv4Address} instance with a C{"TCP"}
type.  A new instance is created for each call, but always for the
same address.
ÚTCPú	127.0.0.1©r   r   s   &r   r   Ú IPv4AddressTCPTests.buildAddresse   ó   € ô ˜5 +¨qÓ1Ð1r   c                ó   € \        RR^ 4      # )ú;
Like L{buildAddress}, but with a different fixed address.
rO   ú	127.0.0.2rQ   r   s   &r   r!   Ú)IPv4AddressTCPTests.buildDifferentAddressm   ó   € ô ˜5 +¨qÓ1Ð1r   r/   N©r0   r1   r2   r3   r   r!   r4   r5   r6   s   @r   rM   rM   d   ó   ø‡ € ò2÷2ð 2r   rM   c                   ó,   a € ] tR t^tt o R tR tRtV tR# )ÚIPv4AddressUDPTestsc                ó   € \        RR^ 4      # )z’
Create an arbitrary new L{IPv4Address} instance with a C{"UDP"}
type.  A new instance is created for each call, but always for the
same address.
ÚUDPrP   rQ   r   s   &r   r   Ú IPv4AddressUDPTests.buildAddressu   rS   r   c                ó   € \        RR^ 4      # )rU   r^   rV   rQ   r   s   &r   r!   Ú)IPv4AddressUDPTests.buildDifferentAddress}   rX   r   r/   NrY   r6   s   @r   r\   r\   t   rZ   r   r\   c                   ó0   a € ] tR t^„t o RtR tR tRtV tR# )ÚIPv6AddressTestsc                ó   € \        RR^ 4      # )z’
Create an arbitrary new L{IPv6Address} instance with a C{"TCP"}
type.  A new instance is created for each call, but always for the
same address.
rO   z::1©r   r   s   &r   r   ÚIPv6AddressTests.buildAddress‡   s   € ô ˜5 %¨Ó+Ð+r   c                ó   € \        RR^ 4      # )rU   rO   z::2re   r   s   &r   r!   Ú&IPv6AddressTests.buildDifferentAddress�   s   € ô ˜5 %¨Ó+Ð+r   r/   Nr:   )	r0   r1   r2   r3   rA   r   r!   r4   r5   r6   s   @r   rc   rc   „   s   ø‡ € ØE€Nò,÷,ð ,r   rc   z&Platform doesn't support UNIX sockets.c                   óx   a € ] tR t^–t o R
tR tR tR tR t]	! ]
R4      R 4       t]	! ]
R4      R 4       tRtV tR	# )ÚUNIXAddressTestsc                óZ   € V P                  4       V n        V P                  4       V n        R # ©N)ÚmktempÚ_socketAddressÚ_otherAddressr   s   &r   ÚsetUpÚUNIXAddressTests.setUpš   s   € Ø"Ÿk™k›mˆÔØ!Ÿ[™[›]ˆÖr   c                ó,   € \        V P                  4      # )z}
Create an arbitrary new L{UNIXAddress} instance.  A new instance is
created for each call, but always for the same address.
©r   rn   r   s   &r   r   ÚUNIXAddressTests.buildAddressž   s   € ô
 ˜4×.Ñ.Ó/Ð/r   c                ó,   € \        V P                  4      # )rU   )r   ro   r   s   &r   r!   Ú&UNIXAddressTests.buildDifferentAddress¥   s   € ô ˜4×-Ñ-Ó.Ð.r   c                óŒ   € V P                  \        V P                  4       4      R\        V P                  4      ,          4       R# )zV
The repr of L{UNIXAddress} returns with the filename that the
L{UNIXAddress} is for.
zUNIXAddress('%s')N)r(   Úreprr   r   rn   r   s   &r   Ú	test_reprÚUNIXAddressTests.test_repr«   s6   € ð
 	×ÑÜ�×"Ñ"Ó$Ó%Ø¤<°×0CÑ0CÓ#DÕEö	
r   ú"Platform does not support symlinksc                óÚ  € V P                  4       p\        V P                  R4      ;_uu_ 4       V n        \        P
                  ! \        P                  P                  V P                  4      V4       V P                  \        V P                  4      \        V4      4       V P                  \        V4      \        V P                  4      4       RRR4       R#   + '       g   i     R# ; i)zE
UNIXAddress objects compare as equal if they link to the same file.
ÚwN)
rm   Úopenrn   ÚfdÚosÚsymlinkÚpathÚabspathr(   r   ©r   ÚlinkNames   & r   Útest_comparisonOfLinkedFilesÚ-UNIXAddressTests.test_comparisonOfLinkedFilesµ   s–   € ð
 —;‘;“=ˆÜ�$×%Ñ% s×+Ô+¨t¬wÜ�JŠJ”r—w‘w—‘ t×':Ñ':Ó;¸XÔFØ×Ñœ[¨×)<Ñ)<Ó=¼{È8Ó?TÔUØ×Ñœ[¨Ó2´KÀ×@SÑ@SÓ4TÔU÷ ,×+×+Ò+úó   ¯B CÃC*	c           
     ó¢  € V P                  4       p\        V P                  R4      ;_uu_ 4       V n        \        P
                  ! \        P                  P                  V P                  4      V4       V P                  \        \        V P                  4      4      \        \        V4      4      4       RRR4       R#   + '       g   i     R# ; i)zE
UNIXAddress Objects that compare as equal have the same hash value.
r}   N)rm   r~   rn   r   r€   r�   r‚   rƒ   r(   Úhashr   r„   s   & r   Útest_hashOfLinkedFilesÚ'UNIXAddressTests.test_hashOfLinkedFilesÀ   sƒ   € ð
 —;‘;“=ˆÜ�$×%Ñ% s×+Ô+¨t¬wÜ�JŠJ”r—w‘w—‘ t×':Ñ':Ó;¸XÔFØ×ÑÜ”[ ×!4Ñ!4Ó5Ó6¼¼[ÈÓ=RÓ8Sô÷ ,×+×+Ò+ús   ¯BB=Â=C	)ro   rn   r   N©)Únamer>   )r0   r1   r2   r3   rA   rp   r   r!   ry   r   ÚsymlinkSkipr†   r‹   r4   r5   r6   s   @r   rj   rj   –   sX   ø‡ € à&€Nò+ò0ò/ò
ñ ˆKÐ=Ó>ñVó ?ðVñ ˆKÐ=Ó>ñ	ó ?ö	r   rj   z&platform doesn't support UNIX sockets.c                   ó^   a € ] tR t^Ít o RtR
tR tR tR t]	! ]
R4      R 4       tR tRtV tR	# )ÚEmptyUNIXAddressTestszB
Tests for L{UNIXAddress} operations involving a L{None} address.
c                ó0   € V P                  4       V n        R # rl   )rm   rn   r   s   &r   rp   ÚEmptyUNIXAddressTests.setUpÕ   s   € Ø"Ÿk™k›mˆÖr   c                ó   € \        R4      # )z­
Create an arbitrary new L{UNIXAddress} instance.  A new instance is
created for each call, but always for the same address. This builds it
with a fixed address of L{None}.
N)r   r   s   &r   r   Ú"EmptyUNIXAddressTests.buildAddressØ   s   € ô ˜4Ó Ð r   c                ó,   € \        V P                  4      # )z>
Like L{buildAddress}, but with a random temporary directory.
rs   r   s   &r   r!   Ú+EmptyUNIXAddressTests.buildDifferentAddressà   s   € ô ˜4×.Ñ.Ó/Ð/r   r{   c                óÚ  € V P                  4       p\        V P                  R4      ;_uu_ 4       V n        \        P
                  ! \        P                  P                  V P                  4      V4       V P                  \        V P                  4      \        R4      4       V P                  \        R4      \        V P                  4      4       RRR4       R#   + '       g   i     R# ; i)zn
A UNIXAddress referring to a L{None} address does not
compare equal to a UNIXAddress referring to a symlink.
r}   N)
rm   r~   rn   r   r€   r�   r‚   rƒ   ÚassertNotEqualr   r„   s   & r   r†   Ú2EmptyUNIXAddressTests.test_comparisonOfLinkedFilesæ   s–   € ð —;‘;“=ˆÜ�$×%Ñ% s×+Ô+¨t¬wÜ�JŠJ”r—w‘w—‘ t×':Ñ':Ó;¸XÔFØ×Ñ¤¨D×,?Ñ,?Ó @Ä+ÈdÓBSÔTØ×Ñ¤¨DÓ 1´;¸t×?RÑ?RÓ3SÔT÷ ,×+×+Ò+úrˆ   c                óx   € V P                  4       pVR/pV P                  W P                  4       ,          4       R# )zm
C{__hash__} can be used to get a hash of an address, even one referring
to L{None} rather than a real path.
TNr   r   s   &  r   Útest_emptyHashÚ$EmptyUNIXAddressTests.test_emptyHashò   r   r   )rn   r   Nr�   )r0   r1   r2   r3   rK   rA   rp   r   r!   r   r�   r†   rœ   r4   r5   r6   s   @r   r‘   r‘   Í   sH   ø‡ € ñð '€Nò,ò!ò0ñ ˆKÐ=Ó>ñ	Uó ?ð	U÷0ð 0r   r‘   )r€   ÚsocketÚunittestr   Útwisted.internet.addressr   r   r   r   Útwisted.python.compatr   Útwisted.python.runtimer	   Útwisted.trial.unittestr
   r   Ú_supportsSymlinksr�   ÚAF_UNIXÚunixSkipÚAttributeErrorr   r9   rC   rM   r\   rc   rj   r‘   r/   r   r   Ú<module>r¨      s  ðó
 
Û Ý ÷ó õ /Ý +ß @à×,Ò,Ó.Ô.€ðØ
‡N‚Nð €H÷(+ñ (+ôVFÐ3ô Fô2˜8Ð%9ô 2ô02Ð-Ð/Gô 2ô 2Ð-Ð/Gô 2ô ,Ð*Ð,@ô ,ñ$ ˆÐ:Ó;ô3Ð*ó 3ó <ð3ñl ˆÐ:Ó;ô+0Ð/Ð1Eó +0ó <ò+0øðo ô Ø‚Hðús   ÁC
 Ã
	CÃC