+
    üÐjýA  ã                   ó¼  € R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	H
t
HtHtHtHtHtHtHtHtHt ^ RIHt ^ RIHt ^ RIHtHt  ! R R]4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t] ! R R4      4       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 R]4      t& ! R R ]4      t'R# )!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                   óN   a € ] tR t^#t o RtR tR tR tR tR t	R t
R tR	tV tR
# )ÚIOTypeTestsz7
Test cases for determining a file-like object's type.
c                ój   € V P                  \        \        P                  ! 4       4      \        4       R# )z-
An L{io.StringIO} accepts and returns text.
N)ÚassertEqualr	   ÚioÚStringIOÚstr©Úselfs   &Ú:/usr/lib/python3/dist-packages/twisted/test/test_compat.pyÚtest_3StringIOÚIOTypeTests.test_3StringIO(   s   € ð 	×Ñœ¤§¢£Ó.´Ö4ó    c                ój   € V P                  \        \        P                  ! 4       4      \        4       R# )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                óÂ   € \        V P                  4       R4      ;_uu_ 4       pV P                  \        V4      \        4       RRR4       R#   + '       g   i     R# ; i)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   s<   € ô �$—+‘+“- ×%Ô%¨Ø×ÑœV A›Y¬Ô,÷ &×%×%Ò%úó   £ AÁA	c                óÂ   € \        V P                  4       R4      ;_uu_ 4       pV P                  \        V4      \        4       RRR4       R#   + '       g   i     R# ; i)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;   s<   € ô �$—+‘+“- ×&Ô&¨!Ø×ÑœV A›Y¬Ô.÷ '×&×&Ò&úr-   c                óØ   € \         P                  ! V P                  4       R4      ;_uu_ 4       pV P                  \	        V4      \
        4       RRR4       R#   + '       g   i     R# ; i)zu
The L{codecs} module, oddly, returns a file-like object which returns
bytes when not passed an 'encoding' argument.
r/   N)Úcodecsr'   r(   r   r	   r"   r)   s   & r   Útest_codecsOpenBytesÚ IOTypeTests.test_codecsOpenBytesB   s@   € ô
 �[Š[˜Ÿ™›¨×-Ô-°Ø×ÑœV A›Y¬Ô.÷ .×-×-Ò-ús   ® AÁA)	c                óÜ   € \         P                  ! V P                  4       RRR7      ;_uu_ 4       pV P                  \	        V4      \
        4       RRR4       R#   + '       g   i     R# ; i)zI
When passed an encoding, however, the L{codecs} module returns unicode.
r/   úutf-8)ÚencodingN)r3   r'   r(   r   r	   r   r)   s   & r   Útest_codecsOpenTextÚIOTypeTests.test_codecsOpenTextJ   sC   € ô �[Š[˜Ÿ™›¨°w×?Õ?À1Ø×ÑœV A›Y¬Ô,÷ @×?×?Ò?ús   ° AÁA+	c                óT   € V P                  \        \        4       4      \        4       R# )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+   r0   r4   r9   r=   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r   #   s2   ø‡ € ñò5ò6ò-ò/ò/ò-÷0ð 0r   r   c                   ó0   a € ] tR t^Yt o RtR tR tRtV tR# )ÚCompatTestszm
Various utility functions in C{twisted.python.compat} provide same
functionality as modern Python variants.
c                ó  € \        4       pVP                  R4       VP                  R4       VP                  R4       \        V4      pVP                  4        V P	                  V. RO4       VP                  R4       \        V4      pVP                  4        V P	                  VRR.4       VP                  R4       RR0pVP                  V4      p\        V4      pVP                  4        V P	                  V. R	O4       R# )
z7
L{set} should behave like the expected set interface.
ÚbÚcÚaÚdÚrÚsN)rN   rL   rM   )rN   rM   rP   rQ   )Ú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                ó,  € \        RR.4      pV P                  \        \        VR4       V P	                  \        V4      RR.4       \        RR.4      pVP                  V4      p\        V4      pVP                  4        V P	                  V. RO4       R# )zC
L{frozenset} should behave like the expected frozenset interface.
rN   rL   rS   rP   rQ   N)rN   rL   rP   rQ   )	Ú	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   r?   N)	r@   rA   rB   rC   rD   rZ   rb   rE   rF   rG   s   @r   rJ   rJ   Y   s   ø‡ € ñò
2÷02ð 2r   rJ   c                   ó<   a € ] tR t^†t o RtR tR tR tR tRt	V t
R# )ÚExecfileCompatTestsz=
Tests for the Python 3-friendly L{execfile} implementation.
c                óö   € V P                  4       p\        VR4      ;_uu_ 4       pVP                  VP                  R4      4       RRR4       \	        VP                  R4      4      #   + '       g   i     L*; i)zW
Write L{content} to a new temporary file, returning the L{FilePath}
for the new file.
r/   ÚasciiNr7   )r(   r'   ÚwriteÚencoder   )r   ÚcontentÚpathr*   s   &&  r   ÚwriteScriptÚExecfileCompatTests.writeScript‹   sU   € ð
 �{‰{‹}ˆÜ�$˜×Ô Ø�G‰G�G—N‘N 7Ó+Ô,÷ ä˜Ÿ™ GÓ,Ó-Ð-÷ ×ús   ¥!A(Á(A8	c                óŽ   € V P                  R4      pR^/p\        VP                  V4       V P                  ^VR,          4       R# )zH
L{execfile} executes the specified file in the given global namespace.
ú	foo += 1
ÚfooN©rl   r   rk   r   )r   ÚscriptÚglobalNamespaces   &  r   Útest_execfileGlobalsÚ(ExecfileCompatTests.test_execfileGlobals•   s@   € ð ×!Ñ! ,Ó/ˆØ  !˜*ˆÜ�—‘˜oÔ.Ø×Ñ˜˜O¨EÕ2Ö3r   c                óÈ   € V P                  R4      pR^
/pR^/p\        VP                  W#4       V P                  ^
VR,          4       V P                  ^VR,          4       R# )zS
L{execfile} executes the specified file in the given global and local
namespaces.
ro   rp   Nrq   )r   rr   rs   ÚlocalNamespaces   &   r   Útest_execfileGlobalsAndLocalsÚ1ExecfileCompatTests.test_execfileGlobalsAndLocalsž   s^   € ð
 ×!Ñ! ,Ó/ˆØ  "˜+ˆØ ˜ˆÜ�—‘˜oÔ>Ø×Ñ˜˜_¨UÕ3Ô4Ø×Ñ˜˜^¨EÕ2Ö3r   c                ó®   € R FN  pV P                  RV,           4      pRR/p\        VP                  V4       V P                  RVR,          4       KP  	  R# )z€
L{execfile} reads in the specified file using universal newlines so
that scripts written on one platform will work on another.
zfoo = 'okay'rp   NÚokay)Ú
Úz
rq   )r   Ú
lineEndingrr   rs   s   &   r   Útest_execfileUniversalNewlinesÚ2ExecfileCompatTests.test_execfileUniversalNewlinesª   sO   € ó
 -ˆJØ×%Ñ% n°zÕ&AÓBˆFØ$ d˜mˆOÜ�V—[‘[ /Ô2Ø×Ñ˜V _°UÕ%;Ö<ó	 -r   r?   N)r@   rA   rB   rC   rD   rl   rt   rx   r   rE   rF   rG   s   @r   re   re   †   s#   ø‡ € ñò.ò4ò
4÷	=ð 	=r   re   c                   ó*   a € ] tR t^¶t o RtR tRtV tR# )ÚPYPYTestz
Identification of PyPy.
c                óˆ   € R\         P                  9   d   V P                  \        4       R# V P	                  \        4       R# )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   r?   N)r@   rA   rB   rC   rD   r‰   rE   rF   rG   s   @r   r‚   r‚   ¶   s   ø‡ € ñ÷$ð $r   r‚   c                   ó0   a € ] tR t^Åt o RtR tR tRtV tR# )Ú
Comparablez=
Objects that can be compared to each other, but not others.
c                ó   € Wn         R # ©N©Úvalue)r   r�   s   &&r   Ú__init__ÚComparable.__init__Ë   s   € ØŽ
r   c                óz   € \        V\        4      '       g   \        # \        V P                  VP                  4      # rŽ   )Ú
isinstancerŒ   ÚNotImplementedr   r�   )r   Úothers   &&r   Ú__cmp__ÚComparable.__cmp__Î   s*   € Ü˜%¤×,Ò,Ü!Ð!Ü�4—:‘:˜uŸ{™{Ó+Ð+r   r�   N)	r@   rA   rB   rC   rD   r‘   r—   rE   rF   rG   s   @r   rŒ   rŒ   Å   s   ø‡ € ñò÷,ð ,r   rŒ   c                   ó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	# )
ÚComparableTestszJ
L{comparable} decorated classes emulate Python 2's C{__cmp__} semantics.
c                óž   € V P                  \        ^4      \        ^4      8H  4       V P                  \        ^4      \        ^4      8H  4       R# )zW
Instances of a class that is decorated by C{comparable} support
equality comparisons.
N©r‡   rŒ   rˆ   r   s   &r   Útest_equalityÚComparableTests.test_equalityÙ   s8   € ð 	�‰œ
 1›¬°A«Ñ6Ô7Ø×Ñœ A›¬*°Q«-Ñ7Ö8r   c                óž   € V P                  \        ^4      \        ^4      8g  4       V P                  \        ^4      \        ^4      8g  4       R# )zY
Instances of a class that is decorated by C{comparable} support
inequality comparisons.
N)rˆ   rŒ   r‡   r   s   &r   Útest_nonEqualityÚ ComparableTests.test_nonEqualityâ   s8   € ð 	×Ñœ A›¬*°Q«-Ñ7Ô8Ø�‰œ
 1›¬°A«Ñ6Ö7r   c                óž   € V P                  \        ^4      \        ^4      8„  4       V P                  \        ^ 4      \        ^4      8„  4       R# )z[
Instances of a class that is decorated by C{comparable} support
greater-than comparisons.
Nrœ   r   s   &r   Útest_greaterThanÚ ComparableTests.test_greaterThanë   ó8   € ð
 	�‰œ
 1›¬
°1«Ñ5Ô6Ø×Ñœ A›¬°A«Ñ6Ö7r   c                óê   € V P                  \        ^4      \        ^4      8¬  4       V P                  \        ^4      \        ^4      8¬  4       V P                  \        ^ 4      \        ^4      8¬  4       R# )zd
Instances of a class that is decorated by C{comparable} support
greater-than-or-equal comparisons.
Nrœ   r   s   &r   Útest_greaterThanOrEqualÚ'ComparableTests.test_greaterThanOrEqualó   óQ   € ð
 	�‰œ
 1›¬°A«Ñ6Ô7Ø�‰œ
 1›¬°A«Ñ6Ô7Ø×Ñœ A›¬*°Q«-Ñ7Ö8r   c                óž   € V P                  \        ^ 4      \        ^4      8  4       V P                  \        ^4      \        ^ 4      8  4       R# )zX
Instances of a class that is decorated by C{comparable} support
less-than comparisons.
Nrœ   r   s   &r   Útest_lessThanÚComparableTests.test_lessThanü   r¥   r   c                óê   € V P                  \        ^4      \        ^4      8*  4       V P                  \        ^ 4      \        ^4      8*  4       V P                  \        ^4      \        ^ 4      8*  4       R# )za
Instances of a class that is decorated by C{comparable} support
less-than-or-equal comparisons.
Nrœ   r   s   &r   Útest_lessThanOrEqualÚ$ComparableTests.test_lessThanOrEqual  r©   r   r?   N)r@   rA   rB   rC   rD   r�   r    r£   r§   r«   r®   rE   rF   rG   s   @r   rš   rš   Ô   s-   ø‡ € ñò9ò8ò8ò9ò8÷9ð 9r   rš   c                   óH   a € ] tR tRt o RtR tR tR tR tR t	R t
R	tV tR
# )ÚPython3ComparableTestsi  z3
Python 3-specific functionality of C{comparable}.
c                ór   € V P                  \        ^4      P                  \        4       4      \        4       R# )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.
N)r   rŒ   Ú__eq__r<   r•   r   s   &r   Útest_notImplementedEqualsÚ0Python3ComparableTests.test_notImplementedEquals  ó%   € ð 	×Ñœ A›×-Ñ-¬f«hÓ7¼ÖHr   c                ór   € V P                  \        ^4      P                  \        4       4      \        4       R# )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.
N)r   rŒ   Ú__ne__r<   r•   r   s   &r   Útest_notImplementedNotEqualsÚ3Python3ComparableTests.test_notImplementedNotEquals  r¶   r   c                ór   € V P                  \        ^4      P                  \        4       4      \        4       R# )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.
N)r   rŒ   Ú__gt__r<   r•   r   s   &r   Útest_notImplementedGreaterThanÚ5Python3ComparableTests.test_notImplementedGreaterThan#  r¶   r   c                ór   € V P                  \        ^4      P                  \        4       4      \        4       R# )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.
N)r   rŒ   Ú__lt__r<   r•   r   s   &r   Útest_notImplementedLessThanÚ2Python3ComparableTests.test_notImplementedLessThan+  r¶   r   c                ór   € V P                  \        ^4      P                  \        4       4      \        4       R# )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.
N)r   rŒ   Ú__ge__r<   r•   r   s   &r   Ú$test_notImplementedGreaterThanEqualsÚ;Python3ComparableTests.test_notImplementedGreaterThanEquals3  r¶   r   c                ór   € V P                  \        ^4      P                  \        4       4      \        4       R# )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.
N)r   rŒ   Ú__le__r<   r•   r   s   &r   Ú!test_notImplementedLessThanEqualsÚ8Python3ComparableTests.test_notImplementedLessThanEquals;  r¶   r   r?   N)r@   rA   rB   rC   rD   r´   r¹   r½   rÁ   rÅ   rÉ   rE   rF   rG   s   @r   r±   r±     s4   ø‡ € ñòIòIòIòIòI÷Ið Ir   r±   c                   ó6   a € ] tR tRt o RtR tR tR tRtV t	R# )ÚCmpTestsiD  z9
L{cmp} should behave like the built-in Python 2 C{cmp}.
c                ó²   € V P                  \        RR4      ^ 4       V P                  \        ^^4      ^ 4       V P                  \        ^.^.4      ^ 4       R# )z%
L{cmp} returns 0 for equal objects.
rN   N©r   r   r   s   &r   Útest_equalsÚCmpTests.test_equalsI  sJ   € ð 	×Ñœ˜S #›¨Ô*Ø×Ñœ˜Q › AÔ&Ø×Ñœ˜a˜S 1 #›¨Ö*r   c                óv   € V P                  \        ^^ 4      ^4       V P                  \        RR4      ^4       R# )zC
L{cmp} returns 1 if its first argument is bigger than its second.
ó   zó   aNrÎ   r   s   &r   r£   ÚCmpTests.test_greaterThanQ  s0   € ð 	×Ñœ˜Q › AÔ&Ø×Ñœ˜T 4›¨!Ö,r   c                óv   € V P                  \        RR4      R4       V P                  \        RR4      R4       R# )zE
L{cmp} returns -1 if its first argument is smaller than its second.
gš™™™™™¹?gffffff@rÓ   ó   dNéÿÿÿÿrÎ   r   s   &r   r«   ÚCmpTests.test_lessThanX  s0   € ð 	×Ñœ˜S #›¨Ô+Ø×Ñœ˜T 4›¨"Ö-r   r?   N)
r@   rA   rB   rC   rD   rÏ   r£   r«   rE   rF   rG   s   @r   rÌ   rÌ   D  s   ø‡ € ñò+ò-÷.ð .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# )ÚStringTestsi`  z0
Compatibility functions and types for strings.
c                óz   € V P                  \        V4      V4       V P                  \        V4      \        4       R# )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                ó<   € V P                  \        \        R4       R# )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                ó<   € V P                  \        \        R4       R# )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                ó*   € V P                  RR4       R# )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                ó*   € V P                  RR4       R# )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                ó*   € V P                  RR4       R# )z:
C{nativeString} leaves native strings as native strings.
zHello!Nrì   r   s   &r   Útest_stringToStringÚStringTests.test_stringToStringŠ  s   € ð 	×Ñ ¨(Ö3r   c                ó<   € V P                  \        \        ^4       R# )z]
C{nativeString} raises a C{TypeError} if given an object that is not a
string of some sort.
N)r^   Ú	TypeErrorr   r   s   &r   Útest_unexpectedTypeÚStringTests.test_unexpectedType�  s   € ð
 	×Ñœ)¤\°1Ö5r   r?   N)r@   rA   rB   rC   rD   rß   rå   rè   rí   rð   ró   r÷   rE   rF   rG   s   @r   rÚ   rÚ   `  s3   ø‡ € ñò;ò?ò@ò3ò8ò4÷6ð 6r   rÚ   c                   ó6   a € ] tR tRt o RtR tR tR tRtV t	R# )ÚNetworkStringTestsi˜  z
Tests for L{networkString}.
c                ó<   € V P                  R\        R4      4       R# )z]
L{networkString} returns a C{unicode} object passed to it encoded into
a C{bytes} instance.
s   foorp   N)r   r   r   s   &r   Útest_strÚNetworkStringTests.test_str�  s   € ð
 	×Ñ˜¤¨uÓ!5Ö6r   c                ó<   € V P                  \        \        R4       R# )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                ó‚   € V P                  \        \        \        4       4       V P                  \        \        R4       R# )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   r?   N)
r@   rA   rB   rC   rD   rü   rÿ   r  rE   rF   rG   s   @r   rú   rú   ˜  s   ø‡ € ñò7òF÷>ð >r   rú   c                   ó0   a € ] tR tRt o RtR tR tRtV tR# )ÚReraiseTestsi´  z@
L{reraise} re-raises exceptions on both Python 2 and Python 3.
c                óÜ  €  ^^ ,            \        XR4       V P	                  R4       R#   \          d    \        P                  ! 4       w  rp LEi ; i  \          d�    \        P                  ! 4       w  rEpT P                  T\        4       T P                  XT4       T P                  \        P                  ! X4      R,          \        P                  ! T4      R,          4        R# i ; i)zm
Calling L{reraise} with an exception instance and a traceback of
L{None} re-raises it with a new traceback.
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                óÜ  €  ^^ ,            \        XX4       V P	                  R4       R#   \          d    \        P                  ! 4       w  rp LEi ; i  \          d�    \        P                  ! 4       w  rEpT P                  T\        4       T P                  XT4       T P                  \        P                  ! X4      R,          \        P                  ! T4      R,          4        R# i ; i)zq
Calling L{reraise} with an exception instance and a traceback
re-raises the exception with the given traceback.
r  Nr×   )
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  r?   N)	r@   rA   rB   rC   rD   r  r  rE   rF   rG   s   @r   r  r  ´  s   ø‡ € ñò7÷*7ð 7r   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	# )
ÚPython3BytesTestsiâ  z:
Tests for L{iterbytes}, L{intToBytes}, L{lazyByteSlice}.
c                óZ   € Rp\        \        V4      4      pV P                  V. RO4       R# )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   abcdN)rÓ   ó   bó   crÖ   )rT   r
   r   )r   ÚinputÚresults   &  r   Útest_iterationÚ Python3BytesTests.test_iterationç  s)   € ð ˆÜ”i Ó&Ó'ˆØ×Ñ˜Ò!9Ö:r   c                ó<   € V P                  \        ^Õ4      R4       R# )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                óR   € RpV P                  \        \        V4      4      V4       R# )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                ób   € RpV P                  \        \        V^4      4      VR,          4       R# )z‰
L{lazyByteSlice} called with some bytes and an offset returns a
semantically equal version of these bytes starting at the given offset.
r)  :é   NNNr*  r+  s   & r   Útest_lazyByteSliceOffsetÚ*Python3BytesTests.test_lazyByteSliceOffset   s)   € ð
 ˆØ×Ñœœ}¨T°1Ó5Ó6¸¸R½ÖAr   c           	     ód   € RpV P                  \        \        V^^4      4      VR,          4       R# )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.
r)  :r0  é   NNr*  r+  s   & r   Ú!test_lazyByteSliceOffsetAndLengthÚ3Python3BytesTests.test_lazyByteSliceOffsetAndLength  s+   € ð ˆØ×Ñœœ}¨T°1°aÓ8Ó9¸4À½9ÖEr   r?   N)r@   rA   rB   rC   rD   r#  r&  r-  r1  r5  rE   rF   rG   s   @r   r  r  â  s+   ø‡ € ñò;ò2ò;òB÷Fð Fr   r  c                   ó`   a € ] tR tRt o Rt]! ]P                  ! 4       R4      R 4       tRt	V t
R# )ÚBytesEnvironTestsi  z
Tests for L{BytesEnviron}.
z+Environment vars are always str on Windows.c                ó  € \        4       p\        4       pVP                  4        F9  w  r4VP                  \	        V4      4       VP                  \	        V4      4       K;  	  V P                  \        V4      \        .4       R# )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   r?   N)r@   rA   rB   rC   rD   r   r   Ú	isWindowsr?  rE   rF   rG   s   @r   r8  r8    s0   ø‡ € ññ ˆH×ÒÓ Ð"OÓPñ/ó Qö/r   r8  )(rD   r3   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   rJ   re   r‚   rŒ   rš   r±   rÌ   rÚ   rú   r  r  r8  r?   r   r   Ú<module>rG     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   