ó
    ×›‘hýA  ã                   óº  • S r SSKrSSKrSSKrSSKrSSKJr  SSKJrJ	r	J
r
JrJrJrJrJrJrJrJrJr  SSKJr  SSKJr  SSKJrJr   " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r\ " S S5      5       r " S S\5      r  " S S\5      r! " S S\5      r" " S S\5      r# " S S\5      r$ " S S\5      r% " S S\5      r& " S  S!\5      r'g)"z%
Tests for L{twisted.python.compat}.
é    N)ÚskipIf)Ú_PYPYÚbytesEnvironÚcmpÚ
comparableÚexecfileÚ
intToBytesÚioTypeÚ	iterbytesÚlazyByteSliceÚnativeStringÚnetworkStringÚreraise)ÚFilePath)Úplatform)ÚSynchronousTestCaseÚTestCasec                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)ÚIOTypeTestsé#   z7
Test cases for determining a file-like object's type.
c                 óh   • U R                  [        [        R                  " 5       5      [        5        g)z-
An L{io.StringIO} accepts and returns text.
N)ÚassertEqualr
   ÚioÚStringIOÚstr©Úselfs    Ú\C:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/test/test_compat.pyÚtest_3StringIOÚIOTypeTests.test_3StringIO(   s   € ð 	×Ñœ¤§¢£Ó.´Õ4ó    c                 óh   • U R                  [        [        R                  " 5       5      [        5        g)z-
An L{io.BytesIO} accepts and returns bytes.
N)r   r
   r   ÚBytesIOÚbytesr   s    r   Útest_3BytesIOÚIOTypeTests.test_3BytesIO.   s   € ð 	×Ñœ¤§
¢
£Ó-¬uÕ5r!   c                 óª   • [        U R                  5       S5       nU R                  [        U5      [        5        SSS5        g! , (       d  f       g= f)zD
A file opened via 'io.open' in text mode accepts and returns text.
ÚwN)ÚopenÚmktempr   r
   r   ©r   Úfs     r   Útest_3openTextModeÚIOTypeTests.test_3openTextMode4   s6   € ô �$—+‘+“- Ô%¨Ø×ÑœV A›Y¬Ô,÷ &×%Ö%úó   › AÁ
Ac                 óª   • [        U R                  5       S5       nU R                  [        U5      [        5        SSS5        g! , (       d  f       g= f)zG
A file opened via 'io.open' in binary mode accepts and returns bytes.
ÚwbN)r)   r*   r   r
   r$   r+   s     r   Útest_3openBinaryModeÚ IOTypeTests.test_3openBinaryMode;   s6   € ô �$—+‘+“- Ô&¨!Ø×ÑœV A›Y¬Ô.÷ '×&Ö&úr/   c                 óÀ   • [         R                  " U R                  5       S5       nU R                  [	        U5      [
        5        SSS5        g! , (       d  f       g= f)zu
The L{codecs} module, oddly, returns a file-like object which returns
bytes when not passed an 'encoding' argument.
r1   N)Úcodecsr)   r*   r   r
   r$   r+   s     r   Útest_codecsOpenBytesÚ IOTypeTests.test_codecsOpenBytesB   s:   € ô
 �[Š[˜Ÿ™›¨Ô-°Ø×ÑœV A›Y¬Ô.÷ .×-Ö-ús   ¦ AÁ
Ac                 ó¾   • [         R                  " U R                  5       SSS9 nU R                  [	        U5      [
        5        SSS5        g! , (       d  f       g= f)zI
When passed an encoding, however, the L{codecs} module returns unicode.
r1   úutf-8)ÚencodingN)r5   r)   r*   r   r
   r   r+   s     r   Útest_codecsOpenTextÚIOTypeTests.test_codecsOpenTextJ   s=   € ô �[Š[˜Ÿ™›¨°wÒ?À1Ø×ÑœV A›Y¬Ô,÷ @×?Ö?ús   ¥ AÁ
Ac                 óR   • U R                  [        [        5       5      [        5        g)za
When passed an object about which no sensible decision can be made, err
on the side of unicode.
N)r   r
   Úobjectr   r   s    r   Útest_defaultToTextÚIOTypeTests.test_defaultToTextQ   s   € ð
 	×Ñœ¤£Ó)¬3Õ/r!   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r%   r-   r2   r6   r;   r?   Ú__static_attributes__rA   r!   r   r   r   #   s*   † ñò5ò6ò-ò/ò/ò-õ0r!   r   c                   ó$   • \ rS rSrSrS rS rSrg)ÚCompatTestséY   zm
Various utility functions in C{twisted.python.compat} provide same
functionality as modern Python variants.
c                 ó  • [        5       nUR                  S5        UR                  S5        UR                  S5        [        U5      nUR                  5         U R	                  U/ SQ5        UR                  S5        [        U5      nUR                  5         U R	                  USS/5        UR                  S5        SS1nUR                  U5      n[        U5      nUR                  5         U R	                  U/ SQ5        g	)
z7
L{set} should behave like the expected set interface.
ÚbÚcÚa)rN   rL   rM   ÚdÚrÚs)rN   rM   rP   rQ   N)ÚsetÚaddÚlistÚsortr   ÚremoveÚdiscardÚunion©r   rN   rL   rO   s       r   Útest_setÚCompatTests.test_set_   sÃ   € ô ‹EˆØ	�‰ˆcŒ
Ø	�‰ˆcŒ
Ø	�‰ˆcŒ
Ü�‹GˆØ	�‰ŒØ×Ñ˜šOÔ,Ø	�‰�ŒÜ�‹GˆØ	�‰ŒØ×Ñ˜˜S #˜JÔ'à	�	‰	�#Œà�#ˆJˆØ�G‰G�A‹JˆÜ�‹GˆØ	�‰ŒØ×Ñ˜Ò0Õ1r!   c                 ó*  • [        SS/5      nU R                  [        [        US5        U R	                  [        U5      SS/5        [        SS/5      nUR                  U5      n[        U5      nUR                  5         U R	                  U/ SQ5        g)zC
L{frozenset} should behave like the expected frozenset interface.
rN   rL   rS   rP   rQ   )rN   rL   rP   rQ   N)	Ú	frozensetÚassertRaisesÚAttributeErrorÚgetattrr   ÚsortedrX   rT   rU   rY   s       r   Útest_frozensetÚCompatTests.test_frozensetw   s|   € ô �s˜C�jÓ!ˆØ×Ñœ.¬'°1°eÔ<Ø×Ñœ › S¨# JÔ/ä�s˜C�jÓ!ˆØ�G‰G�A‹JˆÜ�‹GˆØ	�‰ŒØ×Ñ˜Ò0Õ1r!   rA   N)rB   rC   rD   rE   rF   rZ   rb   rG   rA   r!   r   rI   rI   Y   s   † ñò
2õ02r!   rI   c                   ó0   • \ rS rSrSrS rS rS rS rSr	g)	ÚExecfileCompatTestsé†   z=
Tests for the Python 3-friendly L{execfile} implementation.
c                 óâ   • U R                  5       n[        US5       nUR                  UR                  S5      5        SSS5        [	        UR                  S5      5      $ ! , (       d  f       N(= f)zW
Write L{content} to a new temporary file, returning the L{FilePath}
for the new file.
r1   ÚasciiNr9   )r*   r)   ÚwriteÚencoder   )r   ÚcontentÚpathr,   s       r   ÚwriteScriptÚExecfileCompatTests.writeScript‹   sR   € ð
 �{‰{‹}ˆÜ�$˜Ô Ø�G‰G�G—N‘N 7Ó+Ô,÷ ä˜Ÿ™ GÓ,Ó-Ð-÷ Õús   �!A Á 
A.c                 ó„   • U R                  S5      nSS0n[        UR                  U5        U R                  SUS   5        g)zH
L{execfile} executes the specified file in the given global namespace.
ú	foo += 1
Úfooé   é   N©rm   r   rl   r   )r   ÚscriptÚglobalNamespaces      r   Útest_execfileGlobalsÚ(ExecfileCompatTests.test_execfileGlobals•   s@   € ð ×!Ñ! ,Ó/ˆØ  !˜*ˆÜ�—‘˜oÔ.Ø×Ñ˜˜O¨EÑ2Õ3r!   c                 ó¶   • U R                  S5      nSS0nSS0n[        UR                  X#5        U R                  SUS   5        U R                  SUS   5        g)zS
L{execfile} executes the specified file in the given global and local
namespaces.
rp   rq   é
   é   é   Nrt   )r   ru   rv   ÚlocalNamespaces       r   Útest_execfileGlobalsAndLocalsÚ1ExecfileCompatTests.test_execfileGlobalsAndLocalsž   s^   € ð
 ×!Ñ! ,Ó/ˆØ  "˜+ˆØ ˜ˆÜ�—‘˜oÔ>Ø×Ñ˜˜_¨UÑ3Ô4Ø×Ñ˜˜^¨EÑ2Õ3r!   c                 óœ   • S HF  nU R                  SU-   5      nSS0n[        UR                  U5        U R                  SUS   5        MH     g)z€
L{execfile} reads in the specified file using universal newlines so
that scripts written on one platform will work on another.
)Ú
Úz
zfoo = 'okay'rq   NÚokayrt   )r   Ú
lineEndingru   rv   s       r   Útest_execfileUniversalNewlinesÚ2ExecfileCompatTests.test_execfileUniversalNewlinesª   sO   € ó
 -ˆJØ×%Ñ% n°zÑ&AÓBˆFØ$ d˜mˆOÜ�V—[‘[ /Ô2Ø×Ñ˜V _°UÑ%;Ö<ò	 -r!   rA   N)
rB   rC   rD   rE   rF   rm   rw   r~   r…   rG   rA   r!   r   re   re   †   s   † ñò.ò4ò
4õ	=r!   re   c                   ó   • \ rS rSrSrS rSrg)ÚPYPYTesté¶   z
Identification of PyPy.
c                 ó‚   • S[         R                  ;   a  U R                  [        5        gU R	                  [        5        g)z
On PyPy, L{_PYPY} is True.
ÚPyPyN)ÚsysÚversionÚ
assertTruer   ÚassertFalser   s    r   Ú	test_PYPYÚPYPYTest.test_PYPY»   s*   € ð ”S—[‘[Ó Ø�O‰OœEÕ"à×ÑœUÕ#r!   rA   N)rB   rC   rD   rE   rF   r�   rG   rA   r!   r   rˆ   rˆ   ¶   s   † ñõ$r!   rˆ   c                   ó$   • \ rS rSrSrS rS rSrg)Ú
ComparableéÅ   z=
Objects that can be compared to each other, but not others.
c                 ó   • Xl         g ©N©Úvalue)r   r˜   s     r   Ú__init__ÚComparable.__init__Ë   s   € Ø�
r!   c                 óx   • [        U[        5      (       d  [        $ [        U R                  UR                  5      $ r–   )Ú
isinstancer“   ÚNotImplementedr   r˜   )r   Úothers     r   Ú__cmp__ÚComparable.__cmp__Î   s*   € Ü˜%¤×,Ñ,Ü!Ð!Ü�4—:‘:˜uŸ{™{Ó+Ð+r!   r—   N)rB   rC   rD   rE   rF   r™   rŸ   rG   rA   r!   r   r“   r“   Å   s   † ñòõ,r!   r“   c                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)ÚComparableTestséÔ   zJ
L{comparable} decorated classes emulate Python 2's C{__cmp__} semantics.
c                 óœ   • U R                  [        S5      [        S5      :H  5        U R                  [        S5      [        S5      :H  5        g)zW
Instances of a class that is decorated by C{comparable} support
equality comparisons.
rr   rs   N©rŽ   r“   r�   r   s    r   Útest_equalityÚComparableTests.test_equalityÙ   s8   € ð 	�‰œ
 1›¬°A«Ñ6Ô7Ø×Ñœ A›¬*°Q«-Ñ7Õ8r!   c                 óœ   • U R                  [        S5      [        S5      :g  5        U R                  [        S5      [        S5      :g  5        g)zY
Instances of a class that is decorated by C{comparable} support
inequality comparisons.
rr   rs   N)r�   r“   rŽ   r   s    r   Útest_nonEqualityÚ ComparableTests.test_nonEqualityâ   s8   € ð 	×Ñœ A›¬*°Q«-Ñ7Ô8Ø�‰œ
 1›¬°A«Ñ6Õ7r!   c                 óœ   • U R                  [        S5      [        S5      :„  5        U R                  [        S5      [        S5      :„  5        g)z[
Instances of a class that is decorated by C{comparable} support
greater-than comparisons.
rs   rr   r   é   Nr¥   r   s    r   Útest_greaterThanÚ ComparableTests.test_greaterThanë   ó8   € ð
 	�‰œ
 1›¬
°1«Ñ5Ô6Ø×Ñœ A›¬°A«Ñ6Õ7r!   c                 óè   • U R                  [        S5      [        S5      :¬  5        U R                  [        S5      [        S5      :¬  5        U R                  [        S5      [        S5      :¬  5        g)zd
Instances of a class that is decorated by C{comparable} support
greater-than-or-equal comparisons.
rr   rs   r   r¬   Nr¥   r   s    r   Útest_greaterThanOrEqualÚ'ComparableTests.test_greaterThanOrEqualó   óQ   € ð
 	�‰œ
 1›¬°A«Ñ6Ô7Ø�‰œ
 1›¬°A«Ñ6Ô7Ø×Ñœ A›¬*°Q«-Ñ7Õ8r!   c                 óœ   • U R                  [        S5      [        S5      :  5        U R                  [        S5      [        S5      :  5        g)zX
Instances of a class that is decorated by C{comparable} support
less-than comparisons.
r   r¬   rs   Nr¥   r   s    r   Útest_lessThanÚComparableTests.test_lessThanü   r¯   r!   c                 óè   • U R                  [        S5      [        S5      :*  5        U R                  [        S5      [        S5      :*  5        U R                  [        S5      [        S5      :*  5        g)za
Instances of a class that is decorated by C{comparable} support
less-than-or-equal comparisons.
r¬   r   rs   Nr¥   r   s    r   Útest_lessThanOrEqualÚ$ComparableTests.test_lessThanOrEqual  r³   r!   rA   N)rB   rC   rD   rE   rF   r¦   r©   r­   r±   rµ   r¸   rG   rA   r!   r   r¢   r¢   Ô   s%   † ñò9ò8ò8ò9ò8õ9r!   r¢   c                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)ÚPython3ComparableTestsi  z3
Python 3-specific functionality of C{comparable}.
c                 óp   • U R                  [        S5      R                  [        5       5      [        5        g)z¡
Instances of a class that is decorated by C{comparable} support
returning C{NotImplemented} from C{__eq__} if it is returned by the
underlying C{__cmp__} call.
rr   N)r   r“   Ú__eq__r>   r�   r   s    r   Útest_notImplementedEqualsÚ0Python3ComparableTests.test_notImplementedEquals  ó%   € ð 	×Ñœ A›×-Ñ-¬f«hÓ7¼ÕHr!   c                 óp   • U R                  [        S5      R                  [        5       5      [        5        g)z¡
Instances of a class that is decorated by C{comparable} support
returning C{NotImplemented} from C{__ne__} if it is returned by the
underlying C{__cmp__} call.
rr   N)r   r“   Ú__ne__r>   r�   r   s    r   Útest_notImplementedNotEqualsÚ3Python3ComparableTests.test_notImplementedNotEquals  rÀ   r!   c                 óp   • U R                  [        S5      R                  [        5       5      [        5        g)z¡
Instances of a class that is decorated by C{comparable} support
returning C{NotImplemented} from C{__gt__} if it is returned by the
underlying C{__cmp__} call.
rr   N)r   r“   Ú__gt__r>   r�   r   s    r   Útest_notImplementedGreaterThanÚ5Python3ComparableTests.test_notImplementedGreaterThan#  rÀ   r!   c                 óp   • U R                  [        S5      R                  [        5       5      [        5        g)z¡
Instances of a class that is decorated by C{comparable} support
returning C{NotImplemented} from C{__lt__} if it is returned by the
underlying C{__cmp__} call.
rr   N)r   r“   Ú__lt__r>   r�   r   s    r   Útest_notImplementedLessThanÚ2Python3ComparableTests.test_notImplementedLessThan+  rÀ   r!   c                 óp   • U R                  [        S5      R                  [        5       5      [        5        g)z¡
Instances of a class that is decorated by C{comparable} support
returning C{NotImplemented} from C{__ge__} if it is returned by the
underlying C{__cmp__} call.
rr   N)r   r“   Ú__ge__r>   r�   r   s    r   Ú$test_notImplementedGreaterThanEqualsÚ;Python3ComparableTests.test_notImplementedGreaterThanEquals3  rÀ   r!   c                 óp   • U R                  [        S5      R                  [        5       5      [        5        g)z¡
Instances of a class that is decorated by C{comparable} support
returning C{NotImplemented} from C{__le__} if it is returned by the
underlying C{__cmp__} call.
rr   N)r   r“   Ú__le__r>   r�   r   s    r   Ú!test_notImplementedLessThanEqualsÚ8Python3ComparableTests.test_notImplementedLessThanEquals;  rÀ   r!   rA   N)rB   rC   rD   rE   rF   r¾   rÃ   rÇ   rË   rÏ   rÓ   rG   rA   r!   r   r»   r»     s+   † ñòIòIòIòIòIõIr!   r»   c                   ó*   • \ rS rSrSrS rS rS rSrg)ÚCmpTestsiD  z9
L{cmp} should behave like the built-in Python 2 C{cmp}.
c                 ó°   • U R                  [        SS5      S5        U R                  [        SS5      S5        U R                  [        S/S/5      S5        g)z%
L{cmp} returns 0 for equal objects.
rN   r   rr   N©r   r   r   s    r   Útest_equalsÚCmpTests.test_equalsI  sJ   € ð 	×Ñœ˜S #›¨Ô*Ø×Ñœ˜Q › AÔ&Ø×Ñœ˜a˜S 1 #›¨Õ*r!   c                 ót   • U R                  [        SS5      S5        U R                  [        SS5      S5        g)zC
L{cmp} returns 1 if its first argument is bigger than its second.
é   r   rr   ó   zó   aNrØ   r   s    r   r­   ÚCmpTests.test_greaterThanQ  s0   € ð 	×Ñœ˜Q › AÔ&Ø×Ñœ˜T 4›¨!Õ,r!   c                 ót   • U R                  [        SS5      S5        U R                  [        SS5      S5        g)zE
L{cmp} returns -1 if its first argument is smaller than its second.
gš™™™™™¹?gffffff@éÿÿÿÿrÞ   ó   dNrØ   r   s    r   rµ   ÚCmpTests.test_lessThanX  s0   € ð 	×Ñœ˜S #›¨Ô+Ø×Ñœ˜T 4›¨"Õ-r!   rA   N)	rB   rC   rD   rE   rF   rÙ   r­   rµ   rG   rA   r!   r   rÖ   rÖ   D  s   † ñò+ò-õ.r!   rÖ   c                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)ÚStringTestsi`  z0
Compatibility functions and types for strings.
c                 óx   • U R                  [        U5      U5        U R                  [        U5      [        5        g)z–
Raise an exception indicating a failed test if the output of
C{nativeString(original)} is unequal to the expected string, or is not
a native string.
N)r   r   ÚassertIsInstancer   )r   ÚoriginalÚexpecteds      r   ÚassertNativeStringÚStringTests.assertNativeStringe  s.   € ð 	×Ñœ hÓ/°Ô:Ø×Ñœl¨8Ó4´cÕ:r!   c                 ó:   • U R                  [        [        S5        g)zR
C{nativeString} raises a C{UnicodeError} if input bytes are not ASCII
decodable.
ó   ÿN©r^   ÚUnicodeErrorr   r   s    r   Útest_nonASCIIBytesToStringÚ&StringTests.test_nonASCIIBytesToStringn  s   € ð
 	×Ñœ,¬°gÕ>r!   c                 ó:   • U R                  [        [        S5        g)zS
C{nativeString} raises a C{UnicodeError} if input Unicode is not ASCII
encodable.
u   áˆ´Nrî   r   s    r   Útest_nonASCIIUnicodeToStringÚ(StringTests.test_nonASCIIUnicodeToStringu  s   € ð
 	×Ñœ,¬°hÕ?r!   c                 ó(   • U R                  SS5        g)zg
C{nativeString} converts bytes to the native string format, assuming
an ASCII encoding if applicable.
s   helloÚhelloN©rê   r   s    r   Útest_bytesToStringÚStringTests.test_bytesToString|  s   € ð
 	×Ñ ¨'Õ2r!   c                 ó(   • U R                  SS5        g)zi
C{nativeString} converts unicode to the native string format, assuming
an ASCII encoding if applicable.
zGood dayNr÷   r   s    r   Útest_unicodeToStringÚ StringTests.test_unicodeToStringƒ  s   € ð
 	×Ñ 
¨JÕ7r!   c                 ó(   • U R                  SS5        g)z:
C{nativeString} leaves native strings as native strings.
zHello!Nr÷   r   s    r   Útest_stringToStringÚStringTests.test_stringToStringŠ  s   € ð 	×Ñ ¨(Õ3r!   c                 ó:   • U R                  [        [        S5        g)z]
C{nativeString} raises a C{TypeError} if given an object that is not a
string of some sort.
rr   N)r^   Ú	TypeErrorr   r   s    r   Útest_unexpectedTypeÚStringTests.test_unexpectedType�  s   € ð
 	×Ñœ)¤\°1Õ5r!   rA   N)rB   rC   rD   rE   rF   rê   rð   ró   rø   rû   rþ   r  rG   rA   r!   r   rå   rå   `  s+   † ñò;ò?ò@ò3ò8ò4õ6r!   rå   c                   ó*   • \ rS rSrSrS rS rS rSrg)ÚNetworkStringTestsi˜  z
Tests for L{networkString}.
c                 ó:   • U R                  S[        S5      5        g)z]
L{networkString} returns a C{unicode} object passed to it encoded into
a C{bytes} instance.
s   foorq   N)r   r   r   s    r   Útest_strÚNetworkStringTests.test_str�  s   € ð
 	×Ñ˜¤¨uÓ!5Õ6r!   c                 ó:   • U R                  [        [        S5        g)zw
L{networkString} raises L{UnicodeError} if passed a C{unicode} instance
containing characters not encodable in ASCII.
u   â˜ƒN)r^   rï   r   r   s    r   Útest_unicodeOutOfRangeÚ)NetworkStringTests.test_unicodeOutOfRange¤  s   € ð
 	×Ñœ,¬°}ÕEr!   c                 ó€   • U R                  [        [        [        5       5        U R                  [        [        S5        g)zh
L{networkString} raises L{TypeError} if passed a non-string object or
the wrong type of string object.
s   bytesN)r^   r  r   r>   r   s    r   Útest_nonStringÚ!NetworkStringTests.test_nonString«  s*   € ð
 	×Ñœ)¤]´F³HÔ=Ø×Ñœ)¤]°HÕ=r!   rA   N)	rB   rC   rD   rE   rF   r  r
  r  rG   rA   r!   r   r  r  ˜  s   † ñò7òFõ>r!   r  c                   ó$   • \ rS rSrSrS rS rSrg)ÚReraiseTestsi´  z@
L{reraise} re-raises exceptions on both Python 2 and Python 3.
c                 ó¼  •  SS-     [        WS5        U R	                  S5        g! [          a    [        R                  " 5       u  pn NCf = f! [          aƒ    [        R                  " 5       u  pEnU R                  U[        5        U R                  WU5        U R                  [        R                  " W5      S   [        R                  " U5      S   5         gf = f)zm
Calling L{reraise} with an exception instance and a traceback of
L{None} re-raises it with a new traceback.
rr   r   NúThe exception was not raised.rá   )ÚBaseExceptionrŒ   Úexc_infor   Úfailr   ÚZeroDivisionErrorÚassertIsÚassertNotEqualÚ	tracebackÚ	format_tb©r   Útypr˜   ÚtbÚtyp2Úvalue2Útb2s          r   Útest_reraiseWithNoneÚ!ReraiseTests.test_reraiseWithNone¹  s¾   € ð
	,Ø�ŠEð
	7Ü�E˜4Ô ð �I‰IÐ5Õ6øô ó 	,Ü Ÿ\š\›^‰NˆCšð	,ûô ó 	Ü #§¢£ÑˆD˜#Ø×Ñ˜TÔ#4Ô5Ø�M‰M˜% Ô(Ø×ÑÜ×#Ò# BÓ'¨Ñ+¬Y×-@Ò-@ÀÓ-EÀbÑ-Iöð		úó!   ‚& ˆA ¦"AÁ
AÁB
CÃCc                 ó¼  •  SS-     [        WW5        U R	                  S5        g! [          a    [        R                  " 5       u  pn NCf = f! [          aƒ    [        R                  " 5       u  pEnU R                  U[        5        U R                  WU5        U R                  [        R                  " W5      S   [        R                  " U5      S   5         gf = f)zq
Calling L{reraise} with an exception instance and a traceback
re-raises the exception with the given traceback.
rr   r   r  rá   N)
r  rŒ   r  r   r  r   r  r  r  r  r  s          r   Útest_reraiseWithTracebackÚ&ReraiseTests.test_reraiseWithTracebackÎ  s¾   € ð
	,Ø�ŠEð	7Ü�E˜2Ôð �I‰IÐ5Õ6øô ó 	,Ü Ÿ\š\›^‰NˆCšð	,ûô ó 	XÜ #§¢£ÑˆD˜#Ø×Ñ˜TÔ#4Ô5Ø�M‰M˜% Ô(Ø×ÑœY×0Ò0°Ó4°RÑ8¼)×:MÒ:MÈcÓ:RÐSUÑ:VÖWð		Xúr#  rA   N)rB   rC   rD   rE   rF   r!  r%  rG   rA   r!   r   r  r  ´  s   † ñò7õ*7r!   r  c                   ó6   • \ rS rSrSrS rS rS rS rS r	Sr
g	)
ÚPython3BytesTestsiâ  z:
Tests for L{iterbytes}, L{intToBytes}, L{lazyByteSlice}.
c                 óX   • Sn[        [        U5      5      nU R                  U/ SQ5        g)z�
When L{iterbytes} is called with a bytestring, the returned object
can be iterated over, resulting in the individual bytes of the
bytestring.
s   abcd)rÞ   ó   bó   crâ   N)rT   r   r   )r   ÚinputÚresults      r   Útest_iterationÚ Python3BytesTests.test_iterationç  s)   € ð ˆÜ”i Ó&Ó'ˆØ×Ñ˜Ò!9Õ:r!   c                 ó:   • U R                  [        S5      S5        g)zs
When L{intToBytes} is called with an integer, the result is an
ASCII-encoded string representation of the number.
éÕ   s   213N)r   r	   r   s    r   Útest_intToBytesÚ!Python3BytesTests.test_intToBytesñ  s   € ð
 	×Ñœ C›¨&Õ1r!   c                 óP   • SnU R                  [        [        U5      5      U5        g)z^
L{lazyByteSlice} called with some bytes returns a semantically equal
version of these bytes.
ó   123XYZN©r   r$   r   ©r   Údatas     r   Útest_lazyByteSliceNoOffsetÚ,Python3BytesTests.test_lazyByteSliceNoOffsetø  s#   € ð
 ˆØ×Ñœœ}¨TÓ2Ó3°TÕ:r!   c                 óX   • SnU R                  [        [        US5      5      USS 5        g)z‰
L{lazyByteSlice} called with some bytes and an offset returns a
semantically equal version of these bytes starting at the given offset.
r5  rs   Nr6  r7  s     r   Útest_lazyByteSliceOffsetÚ*Python3BytesTests.test_lazyByteSliceOffset   s+   € ð
 ˆØ×Ñœœ}¨T°1Ó5Ó6¸¸Q¸R¸ÕAr!   c           	      óZ   • SnU R                  [        [        USS5      5      USS 5        g)z«
L{lazyByteSlice} called with some bytes, an offset and a length returns
a semantically equal version of these bytes starting at the given
offset, up to the given length.
r5  rs   r¬   é   Nr6  r7  s     r   Ú!test_lazyByteSliceOffsetAndLengthÚ3Python3BytesTests.test_lazyByteSliceOffsetAndLength  s-   € ð ˆØ×Ñœœ}¨T°1°aÓ8Ó9¸4ÀÀ!¸9ÕEr!   rA   N)rB   rC   rD   rE   rF   r.  r2  r9  r<  r@  rG   rA   r!   r   r(  r(  â  s"   † ñò;ò2ò;òBõFr!   r(  c                   óT   • \ rS rSrSr\" \R                  " 5       S5      S 5       rSr	g)ÚBytesEnvironTestsi  z
Tests for L{BytesEnviron}.
z+Environment vars are always str on Windows.c                 ó  • [        5       n[        5       nUR                  5        H9  u  p4UR                  [	        U5      5        UR                  [	        U5      5        M;     U R                  [        U5      [        /5        g)zb
The output of L{BytesEnviron} should always be a L{dict} with L{bytes}
values and L{bytes} keys.
N)r   rR   ÚitemsrS   Útyper   rT   r$   )r   r-  ÚtypesÚkeyÚvals        r   Útest_alwaysBytesÚ"BytesEnvironTests.test_alwaysBytes  s\   € ô “ˆÜ“ˆàŸ™ž‰HˆCØ�I‰I”d˜3“iÔ Ø�I‰I”d˜3“iÖ ñ 'ð 	×Ñœ˜e›¤u gÕ.r!   rA   N)
rB   rC   rD   rE   rF   r   r   Ú	isWindowsrJ  rG   rA   r!   r   rC  rC    s-   † ññ ˆH×ÒÓ Ð"OÓPñ/ó Qó/r!   rC  )(rF   r5   r   rŒ   r  Úunittestr   Útwisted.python.compatr   r   r   r   r   r	   r
   r   r   r   r   r   Útwisted.python.filepathr   Útwisted.python.runtimer   Útwisted.trial.unittestr   r   r   rI   re   rˆ   r“   r¢   r»   rÖ   rå   r  r  r(  rC  rA   r!   r   Ú<module>rR     sú   ðñ
ó
 Û 	Û 
Û Ý ÷÷ ÷ ó õ -Ý +ß @ô30Ð%ô 30ôl*2Ð%ô *2ôZ-=Ð-ô -=ô`$Ð"ô $ð ÷,ð ,ó ð,ô79Ð)ô 79ôt3IÐ0ô 3Iôl.Ð"ô .ô856Ð%ô 56ôp>Ð,ô >ô8+7Ð&ô +7ô\-FÐ+ô -Fô`/˜õ /r!   