§
    Ètºf�í  ã                   óÖ  — d Z ddlZddlZddlmZmZ ddlmZm	Z	m
Z
 ddlmZmZ ddlmZ ddlmZmZmZ ddlmZ dd	lmZ  G d
„ de¦  «        Z G d„ d¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z  G d„ dej        ¦  «        Z! G d„ dej        ¦  «        Z" G d„ dej        ¦  «        Z# ee#j$        ¦  «        d „ ¦   «         Z% ee#j$        d!¬"¦  «        d#„ ¦   «         Z& G d$„ d%ej        ¦  «        Z'd&„ Z(e(Z) ee'j$        d'e*d(¦  «         d)„ Z+dS )*aò  
Tests for assertions provided by C{SynchronousTestCase} and C{TestCase},
provided by L{twisted.trial.unittest}.

L{TestFailureTests} demonstrates that L{SynchronousTestCase.fail} works, so that
is the only method on C{twisted.trial.unittest.SynchronousTestCase} that is
initially assumed to work.  The test classes are arranged so that the methods
demonstrated to work earlier in the file are used by those later in the file
(even though the runner will probably not run the tests in this order).
é    N)ÚVersionÚgetVersionString)ÚDeferredÚfailÚsucceed)Ú
deprecatedÚdeprecatedModuleAttribute)ÚFailure)ÚaccumulateMethodsÚfullyQualifiedNameÚprefixedMethods)ÚFancyEqMixin)Úunittestc                   ó$   — e Zd ZdZd„ Zdefd„ZdS )ÚMockEquality©Únamec                 ó   — || _         d S ©Nr   )Úselfr   s     úa/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/trial/test/test_assertions.pyÚ__init__zMockEquality.__init__$   s   € ØˆŒ	ˆ	ˆ	ó    Úreturnc                 ó   — d| j         › d�S )NzMockEquality(ú)r   ©r   s    r   Ú__repr__zMockEquality.__repr__'   s   € Ø+˜tœyÐ+Ð+Ð+Ð+r   N)Ú__name__Ú
__module__Ú__qualname__ÚcompareAttributesr   Ústrr   © r   r   r   r   !   sD   € € € € € Ø!Ððð ð ð,˜#ð ,ð ,ð ,ð ,ð ,ð ,r   r   c                   ó    — e Zd ZdZd„ ZeZeZdS )ÚComparisonErrorzH
    An object which raises exceptions from its comparison methods.
    c                 ó    — t          d¦  «        ‚)NzComparison is broken)Ú
ValueError)r   Úothers     r   Ú_errorzComparisonError._error0   s   € ÝÐ/Ñ0Ô0Ð0r   N)r   r    r!   Ú__doc__r*   Ú__eq__Ú__ne__r$   r   r   r&   r&   +   s3   € € € € € ðð ð1ð 1ð 1ð €FØ€F€F€Fr   r&   c                   óJ   — e Zd ZdZ G d„ dej        ¦  «        Zd„ Zd„ Zd„ Z	dS )ÚTestFailureTestsaÑ  
    Tests for the most basic functionality of L{SynchronousTestCase}, for
    failing tests.

    This class contains tests to demonstrate that L{SynchronousTestCase.fail}
    can be used to fail a test, and that that failure is reflected in the test
    result object.  This should be sufficient functionality so that further
    tests can be built on L{SynchronousTestCase} instead of
    L{unittest.TestCase}.  This depends on L{unittest.TestCase} working.
    c                   ó   — e Zd Zd„ ZdS )úTestFailureTests.FailingTestc                 ó0   — |                       d¦  «         d S )NzThis test fails.©r   r   s    r   Ú
test_failsz'TestFailureTests.FailingTest.test_failsD   s   € Ø�IŠIÐ(Ñ)Ô)Ð)Ð)Ð)r   N)r   r    r!   r4   r$   r   r   ÚFailingTestr1   C   s#   € € € € € ð	*ð 	*ð 	*ð 	*ð 	*r   r5   c                 ó  — t           | j        j         | j        j         g}t          j        ¦   «         | _        | j                             d                     |¦  «        ¦  «        | _        t          | j        ¦  «        d         | _
        dS )zo
        Load a suite of one test which can be used to exercise the failure
        handling behavior.
        ú.r   N)r   Ú	__class__r5   ÚpyunitÚ
TestLoaderÚloaderÚloadTestsFromNameÚjoinÚsuiteÚlistÚtest)r   Ú
componentss     r   ÚsetUpzTestFailureTests.setUpG   sh   € õ
  ¤Ô 7¸Ô9IÔ9RÐSˆ
ÝÔ'Ñ)Ô)ˆŒØ”[×2Ò2°3·8²8¸JÑ3GÔ3GÑHÔHˆŒ
Ý˜œÑ$Ô$ QÔ'ˆŒ	ˆ	ˆ	r   c                 óæ   — 	 | j                              d¦  «         |                      d¦  «         dS # | j         j        $ r.}|                      dt	          |¦  «        ¦  «         Y d}~dS d}~ww xY w)z}
        L{SynchronousTestCase.fail} raises
        L{SynchronousTestCase.failureException} with the given argument.
        ÚfailedzRSynchronousTestCase.fail method did not raise SynchronousTestCase.failureExceptionN)r@   r   ÚfailureExceptionÚassertEqualr#   ©r   Úresults     r   Ú	test_failzTestFailureTests.test_failQ   s–   € ð
	ØŒI�NŠN˜8Ñ$Ô$Ð$ð �IŠIð7ñô ð ð ð øð ŒyÔ)ð 	4ð 	4ð 	4Ø×Ò˜X¥s¨6¡{¤{Ñ3Ô3Ð3Ð3Ð3Ð3Ð3Ð3Ð3øøøøð	4øøøs   ‚3 ³A0Á#A+Á+A0c                 óŒ  — t          j        ¦   «         }| j                             |¦  «         |                      |                     ¦   «         ¦  «         |                      |j        g ¦  «         |                      t          |j	        ¦  «        d¦  «         |                      |j	        d         d         | j
        ¦  «         dS )z–
        When a test method raises L{SynchronousTestCase.failureException}, the test is
        marked as having failed on the L{TestResult}.
        é   r   N)r9   Ú
TestResultr>   ÚrunÚassertFalseÚwasSuccessfulrF   ÚerrorsÚlenÚfailuresr@   rG   s     r   Útest_failingExceptionFailsz+TestFailureTests.test_failingExceptionFails`   s¨   € õ
 Ô"Ñ$Ô$ˆØŒ
�Š�vÑÔÐØ×Ò˜×-Ò-Ñ/Ô/Ñ0Ô0Ð0Ø×Ò˜œ¨Ñ+Ô+Ð+Ø×Ò�˜Vœ_Ñ-Ô-¨qÑ1Ô1Ð1Ø×Ò˜œ¨Ô+¨AÔ.°´	Ñ:Ô:Ð:Ð:Ð:r   N)
r   r    r!   r+   r   ÚSynchronousTestCaser5   rB   rI   rS   r$   r   r   r/   r/   7   sx   € € € € € ð	ð 	ð*ð *ð *ð *ð *�hÔ2ñ *ô *ð *ð(ð (ð (ðð ð ð
;ð 
;ð 
;ð 
;ð 
;r   r/   c                   ó6   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	dS )	ÚAssertFalseTestsa  
    Tests for L{SynchronousTestCase}'s C{assertFalse} and C{failIf} assertion
    methods.

    This is pretty paranoid.  Still, a certain paranoia is healthy if you
    are testing a unit testing framework.

    @note: As of 11.2, C{assertFalse} is preferred over C{failIf}.
    c                 óv   — dddddg fD ]/} ||d|›�¦  «        }||k    r|                       d|›�¦  «         Œ0dS )z‚
        Perform the positive case test for C{failIf} or C{assertFalse}.

        @param method: The test method to test.
        r   ç        FNr$   ú
failed on úDid not return argument r3   )r   ÚmethodÚnotTruerH   s       r   Ú_assertFalseFalsez"AssertFalseTests._assertFalseFalsex   so   € ð ˜3  t¨R°Ð4ð 	Bð 	BˆGØ�V˜GÐ%=°'Ð%=Ð%=Ñ>Ô>ˆFØ˜Ò Ð Ø—	’	Ð@°WÐ@Ð@ÑAÔAÐAøð	Bð 	Br   c           
      ó  — dddddgdfD ]w}	  ||d|›�¦  «         |                       d|j        ›d|›d	�¦  «         Œ4# | j        $ r7}|                      d|›�t	          |¦  «        d
|›d|›�¦  «         Y d}~Œpd}~ww xY wdS )z‚
        Perform the negative case test for C{failIf} or C{assertFalse}.

        @param method: The test method to test.
        rK   TÚcaté   ©é   é   rY   úCall to ú(ú) didn't failúRaised incorrect exception on ú: N©r   r   rE   ÚassertInr#   )r   r[   ÚtrueÚes       r   Ú_assertFalseTruez!AssertFalseTests._assertFalseTrueƒ   sü   € ð ˜˜e a¨ V¨VÐ4ð 	ð 	ˆDðØ��tÐ2¨$Ð2Ð2Ñ3Ô3Ð3ð —	’	�	ð œ˜˜Ø˜˜ðñô ð ð øð Ô(ð ð ð Ø—’Ø) Ð)Ð)Ý˜‘F”FØD°TÐDÐD¸qÐDÐDñô ð ð ð ð ð ð øøøøðøøøð	ð 	s   �>¾
A?Á-A:Á:A?c                 ó:   — |                       | j        ¦  «         dS )zt
        L{SynchronousTestCase.failIf} returns its argument if its argument is
        not considered true.
        N)r]   ÚfailIfr   s    r   Útest_failIfFalsez!AssertFalseTests.test_failIfFalse›   s    € ð
 	×Ò˜tœ{Ñ+Ô+Ð+Ð+Ð+r   c                 ó:   — |                       | j        ¦  «         dS )zy
        L{SynchronousTestCase.assertFalse} returns its argument if its argument
        is not considered true.
        N)r]   rN   r   s    r   Útest_assertFalseFalsez&AssertFalseTests.test_assertFalseFalse¢   s!   € ð
 	×Ò˜tÔ/Ñ0Ô0Ð0Ð0Ð0r   c                 ó:   — |                       | j        ¦  «         dS )z’
        L{SynchronousTestCase.failIf} raises
        L{SynchronousTestCase.failureException} if its argument is considered
        true.
        N)rm   ro   r   s    r   Útest_failIfTruez AssertFalseTests.test_failIfTrue©   s    € ð 	×Ò˜dœkÑ*Ô*Ð*Ð*Ð*r   c                 ó:   — |                       | j        ¦  «         dS )z—
        L{SynchronousTestCase.assertFalse} raises
        L{SynchronousTestCase.failureException} if its argument is considered
        true.
        N)rm   rN   r   s    r   Útest_assertFalseTruez%AssertFalseTests.test_assertFalseTrue±   s!   € ð 	×Ò˜dÔ.Ñ/Ô/Ð/Ð/Ð/r   N)
r   r    r!   r+   r]   rm   rp   rr   rt   rv   r$   r   r   rV   rV   m   s{   € € € € € ðð ð	Bð 	Bð 	Bðð ð ð0,ð ,ð ,ð1ð 1ð 1ð+ð +ð +ð0ð 0ð 0ð 0ð 0r   rV   c                   ó6   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	dS )	ÚAssertTrueTestsa  
    Tests for L{SynchronousTestCase}'s C{assertTrue} and C{failUnless} assertion
    methods.

    This is pretty paranoid.  Still, a certain paranoia is healthy if you
    are testing a unit testing framework.

    @note: As of 11.2, C{assertTrue} is preferred over C{failUnless}.
    c           
      ó  — dddddg fD ]w}	  ||d|›�¦  «         |                       d|j        ›d|›d	�¦  «         Œ4# | j        $ r7}|                      d|›�t	          |¦  «        d
|›d|›�¦  «         Y d}~Œpd}~ww xY wdS )z†
        Perform the negative case test for C{assertTrue} and C{failUnless}.

        @param method: The test method to test.
        r   rX   FNr$   rY   rd   re   rf   rg   rh   ri   )r   r[   r\   rl   s       r   Ú_assertTrueFalsez AssertTrueTests._assertTrueFalseÅ   sú   € ð ˜3  t¨R°Ð4ð 	ð 	ˆGðØ��wÐ 8¨WÐ 8Ð 8Ñ9Ô9Ð9ð —	’	�	ð œ˜˜Ø˜˜ðñô ð ð øð Ô(ð ð ð Ø—’Ø, Ð,Ð,Ý˜‘F”FØG°WÐGÐGÀ!ÐGÐGñô ð ð ð ð ð ð øøøøðøøøð	ð 	s   Œ=½
A>Á-A9Á9A>c                 óx   — dddddgdfD ]/} ||d|›�¦  «        }||k    r|                       d|›�¦  «         Œ0dS )	z†
        Perform the positive case test for C{assertTrue} and C{failUnless}.

        @param method: The test method to test.
        rK   Tr_   r`   ra   rY   rZ   Nr3   )r   r[   rk   rH   s       r   Ú_assertTrueTruezAssertTrueTests._assertTrueTrueÝ   sk   € ð ˜˜e a¨ V¨VÐ4ð 	?ð 	?ˆDØ�V˜DÐ"7¨tÐ"7Ð"7Ñ8Ô8ˆFØ˜Š~ˆ~Ø—	’	Ð=°TÐ=Ð=Ñ>Ô>Ð>øð	?ð 	?r   c                 ó:   — |                       | j        ¦  «         dS )zš
        L{SynchronousTestCase.assertTrue} raises
        L{SynchronousTestCase.failureException} if its argument is not
        considered true.
        N)rz   Ú
assertTruer   s    r   Útest_assertTrueFalsez$AssertTrueTests.test_assertTrueFalseè   ó    € ð 	×Ò˜dœoÑ.Ô.Ð.Ð.Ð.r   c                 ó:   — |                       | j        ¦  «         dS )zš
        L{SynchronousTestCase.failUnless} raises
        L{SynchronousTestCase.failureException} if its argument is not
        considered true.
        N)rz   Ú
failUnlessr   s    r   Útest_failUnlessFalsez$AssertTrueTests.test_failUnlessFalseð   r€   r   c                 ó:   — |                       | j        ¦  «         dS )zt
        L{SynchronousTestCase.assertTrue} returns its argument if its argument
        is considered true.
        N)r|   r~   r   s    r   Útest_assertTrueTruez#AssertTrueTests.test_assertTrueTrueø   ó    € ð
 	×Ò˜Tœ_Ñ-Ô-Ð-Ð-Ð-r   c                 ó:   — |                       | j        ¦  «         dS )zt
        L{SynchronousTestCase.failUnless} returns its argument if its argument
        is considered true.
        N)r|   r‚   r   s    r   Útest_failUnlessTruez#AssertTrueTests.test_failUnlessTrueÿ   r†   r   N)
r   r    r!   r+   rz   r|   r   rƒ   r…   rˆ   r$   r   r   rx   rx   º   sx   € € € € € ðð ðð ð ð0	?ð 	?ð 	?ð/ð /ð /ð/ð /ð /ð.ð .ð .ð.ð .ð .ð .ð .r   rx   c                   ó8  — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z d„ Z!d „ Z"d!„ Z#d"„ Z$d#„ Z%d$„ Z&d%„ Z'd&„ Z(d'„ Z)d(„ Z*d)„ Z+ e,e-j.        d*d+¦  «        €	d,e+_/        d+S d+S )-ÚSynchronousAssertionsTestsa£  
    Tests for L{SynchronousTestCase}'s assertion methods.  That is, failUnless*,
    failIf*, assert* (not covered by other more specific test classes).

    Note: As of 11.2, assertEqual is preferred over the failUnlessEqual(s)
    variants.  Tests have been modified to reflect this preference.

    This is pretty paranoid.  Still, a certain paranoia is healthy if you are
    testing a unit testing framework.
    c                 ól   — |                       ||¦  «        }||k    r|                      d¦  «         d S d S )Nz)assertEqual should return first parameter)rF   r   )r   ÚfirstÚsecondÚxs       r   Ú_testEqualPairz)SynchronousAssertionsTests._testEqualPair  s@   € Ø×Ò˜U FÑ+Ô+ˆØ�Š:ˆ:Ø�IŠIÐAÑBÔBÐBÐBÐBð ˆ:r   c                 ó°  — d}	 |                       ||¦  «         n›# | j        $ rŽ}t          j        d¦  «        }	 |                      ||¦  «         nX# |j        $ rK}d}t	          |¦  «        }t	          |¦  «        }||k    r|                      d|›d|›�¦  «         Y d}~nd}~ww xY wY d}~nd}~ww xY w|s|                      d|›d|›d	�¦  «         dS dS )
zË
        Assert that when called with unequal arguments, C{assertEqual} raises a
        failure exception with the same message as the standard library
        C{assertEqual} would have raised.
        FrB   Tz
Expected: z; Got: NzCall to assertEqual(ú, rf   )rF   rE   r9   ÚTestCaser#   r   )	r   rŒ   r�   ÚraisedÚ
ourFailureÚcaseÚtheirFailureÚgotÚexpecteds	            r   Ú_testUnequalPairz+SynchronousAssertionsTests._testUnequalPair  s8  € ð ˆð	GØ×Ò˜U FÑ+Ô+Ð+Ð+øØÔ$ð 		Gð 		Gð 		GÝ”? 7Ñ+Ô+ˆDðGØ× Ò  ¨Ñ/Ô/Ð/Ð/øØÔ(ð Gð Gð GØ�Ý˜*‘o”o�Ý˜|Ñ,Ô,�Ø˜s’?�?Ø—I’IÐE¨8ÐEÐE¸cÐEÐEÑFÔFÐFøøøøøøøøøðGøøøøøøøøøøøøð			Gøøøð ð 	QØ�IŠIÐO¨UÐOÐO¸ÐOÐOÐOÑPÔPÐPÐPÐPð	Qð 	Qs>   „ ›
B3¥B.ºAÁB.Á
B&ÁAB!ÂB.Â!B&Â&B.Â.B3c                 ó¼   — |                       dd¦  «         |                      dd¦  «         |                       dgdg¦  «         |                      dgd¦  «         d S )Nr_   ÚdogrK   Úorange)r�   r™   r   s    r   Útest_assertEqual_basicz1SynchronousAssertionsTests.test_assertEqual_basic/  sf   € Ø×Ò˜E 5Ñ)Ô)Ð)Ø×Ò˜e UÑ+Ô+Ð+Ø×Ò˜Q˜C ! Ñ%Ô%Ð%Ø×Ò˜q˜c 8Ñ,Ô,Ð,Ð,Ð,r   c                 ó  — t          d¦  «        }t          d¦  «        }t          d¦  «        }|                      ||¦  «         |                      ||¦  «         |                      ||¦  «         |                      ||¦  «         d S )NrŒ   r�   )r   r�   r™   )r   rŽ   ÚyÚzs       r   Útest_assertEqual_customz2SynchronousAssertionsTests.test_assertEqual_custom5  s‡   € Ý˜Ñ!Ô!ˆÝ˜Ñ"Ô"ˆÝ˜Ñ!Ô!ˆØ×Ò˜A˜qÑ!Ô!Ð!Ø×Ò˜A˜qÑ!Ô!Ð!Ø×Ò˜a Ñ#Ô#Ð#Ø×Ò˜a Ñ#Ô#Ð#Ð#Ð#r   c                 ó–   — d}|                       | j        | j        dd|¦  «        }|                      |t	          |¦  «        ¦  «         dS )zi
        When a message is passed to L{assertEqual} it is included in the error
        message.
        ÚmessageÚfooÚbarN)ÚassertRaisesrE   rF   rj   r#   )r   r£   Ú	exceptions      r   Útest_assertEqualMessagez2SynchronousAssertionsTests.test_assertEqualMessage>  sQ   € ð
 ˆØ×%Ò%ØÔ! 4Ô#3°U¸EÀ7ñ
ô 
ˆ	ð 	�Š�g�s 9™~œ~Ñ.Ô.Ð.Ð.Ð.r   c                 óð   — |                       | j        | j        ddd¦  «        }|                       | j        | j        dd¦  «        }|                      t          |¦  «        t          |¦  «        ¦  «         dS )zz
        If a message is specified as L{None}, it is not included in the error
        message of L{assertEqual}.
        r¤   r¥   N)r¦   rE   rF   r#   )r   ÚexceptionForNoneÚexceptionWithouts      r   Útest_assertEqualNoneMessagez6SynchronousAssertionsTests.test_assertEqualNoneMessageI  s‚   € ð
  ×,Ò,ØÔ! 4Ô#3°U¸EÀ4ñ
ô 
Ðð  ×,Ò,ØÔ! 4Ô#3°U¸Eñ
ô 
Ðð 	×Ò�Ð-Ñ.Ô.µÐ4DÑ0EÔ0EÑFÔFÐFÐFÐFr   c                 ó  — t          ¦   «         }dg}	 |                      ||¦  «         |                      d                     ||¦  «        ¦  «         d S # | j        $ r |                      d¦  «         Y d S t
          $ r Y d S w xY w)Nrœ   z7Comparing {!r} and {!r} should have raised an exceptionz6Fail raised when ValueError ought to have been raised.)r&   rF   r   ÚformatrE   r(   )r   Úapplerœ   s      r   Útest_assertEqual_incomparablez8SynchronousAssertionsTests.test_assertEqual_incomparableV  sÁ   € ÝÑ!Ô!ˆØ�ˆð	Ø×Ò˜U FÑ+Ô+Ð+ð �IŠIØI×PÒPØ˜6ñô ñô ð ð ð øð Ô$ð 	Pð 	Pð 	PØ�IŠIÐNÑOÔOÐOÐOÐOÐOÝð 	ð 	ð 	àˆDˆDð	øøøs   “A ÁBÁ6	BÂBc                 ó   — |‚r   r$   )r   Úerrors     r   Ú_raiseErrorz&SynchronousAssertionsTests._raiseErrorg  s   € Øˆr   c                 ó¤   — |                       t          | j        t          ¦  «        }|                      t	          |t          ¦  «        d¦  «         d S )Nz?Expect failUnlessRaises to return instance of raised exception.)ÚfailUnlessRaisesr(   r³   r~   Ú
isinstance©r   rŽ   s     r   Útest_failUnlessRaises_expectedz9SynchronousAssertionsTests.test_failUnlessRaises_expectedj  sL   € Ø×!Ò!¥*¨dÔ.>Å
ÑKÔKˆØ�ŠÝ�q�*Ñ%Ô%ØPñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óâ   — 	 |                       t          | j        t          ¦  «         |                      d¦  «         d S # t          $ r |                      d¦  «         Y d S | j        $ r Y d S w xY w)Nz4Expected exception wasn't raised. Should have failedz9failUnlessRaises shouldn't re-raise unexpected exceptions)rµ   r(   r³   Ú	TypeErrorr   rE   r   s    r   Ú test_failUnlessRaises_unexpectedz;SynchronousAssertionsTests.test_failUnlessRaises_unexpectedq  s–   € ð	NØ×!Ò!¥*¨dÔ.>Å	ÑJÔJÐJð �IŠIÐLÑMÔMÐMÐMÐMøõ ð 	Vð 	Vð 	VØ�IŠIÐTÑUÔUÐUÐUÐUÐUØÔ$ð 	ð 	ð 	àˆDˆDð	øøøs   ‚&? ¿A.Á!	A.Á-A.c                 óê   ‡— dŠ	 |                       t          ˆfd„¦  «         |                      d¦  «         d S # | j        $ r.}|                      t          |¦  «        d¦  «         Y d }~d S d }~ww xY w)Nrb   c                  ó   •— ‰ S r   r$   )ÚreturnValues   €r   ú<lambda>zNSynchronousAssertionsTests.test_failUnlessRaises_noException.<locals>.<lambda>  s   ø€ °k€ r   z(Exception not raised. Should have failedz"ValueError not raised (3 returned))rµ   r(   r   rE   rF   r#   )r   rl   r¾   s     @r   Ú!test_failUnlessRaises_noExceptionz<SynchronousAssertionsTests.test_failUnlessRaises_noException|  s    ø€ Øˆð	BØ×!Ò!¥*Ð.AÐ.AÐ.AÐ.AÑBÔBÐBð �IŠIÐ@ÑAÔAÐAÐAÐAøð Ô$ð 	Kð 	Kð 	KØ×Ò�S ™VœVÐ%IÑJÔJÐJÐJÐJÐJÐJÐJÐJøøøøð	Køøøs   …: º
A2Á#A-Á-A2c                 óP  — |                       | j        | j        | j        ¦  «        }|                      t	          || j        ¦  «        d| j        ›d�¦  «         	 |                       | j        | j        t
          ¦  «        }|                      d¦  «         d S # | j        $ r Y d S w xY w)Nz	Expected z instance to be returnedzShould have raised exception)rµ   rE   r³   r~   r¶   r(   r   r·   s     r   Ú&test_failUnlessRaises_failureExceptionzASynchronousAssertionsTests.test_failUnlessRaises_failureException…  sÉ   € Ø×!Ò!ØÔ! 4Ô#3°TÔ5Jñ
ô 
ˆð 	�ŠÝ�q˜$Ô/Ñ0Ô0ØI˜Ô-ÐIÐIÐIñ	
ô 	
ð 	
ð	6Ø×%Ò%ØÔ% tÔ'7½ñô ˆAð �IŠIÐ4Ñ5Ô5Ð5Ð5Ð5øð	 Ô$ð 	ð 	ð 	àˆDˆDð	øøøs   Á&B Â
B%Â$B%c                 óª   — t          d¦  «        }|                      t           ¦  «        5 }|‚# 1 swxY w Y   |                      ||j        ¦  «         dS )zý
        If C{assertRaises} is used to create a context manager and an exception
        is raised from the body of the C{with} statement then the context
        manager's C{exception} attribute is set to the exception that was
        raised.
        ÚmarkerN)r(   r¦   ÚassertIsr§   )r   r§   Úcontexts      r   Ú test_assertRaisesContextExpectedz;SynchronousAssertionsTests.test_assertRaisesContextExpected—  sx   € õ ˜xÑ(Ô(ˆ	à×Ò�zÑ*Ô*ð 	¨gØˆOð	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	�Š�i Ô!2Ñ3Ô3Ð3Ð3Ð3s   ª-­1´1c                 ó´  — 	 |                       t          ¦  «        5  t          d¦  «        ‚# 1 swxY w Y   	 |                      d¦  «         dS # | j        $ r~}t          |¦  «        }d                     t          t          ¦  «        ¬¦  «        }|                      | 	                    |¦  «        d                     |¦  «        ¦  «         Y d}~dS d}~ww xY w)zý
        If C{assertRaises} is used to create a context manager and the wrong
        exception type is raised from the body of the C{with} statement then
        the C{with} statement raises C{failureException} describing the
        mismatch.
        rÄ   Nú:Mismatched exception type should have caused test failure.z/{type} raised instead of ValueError:
 Traceback)Útypez=Exception message did not begin with expected information: {})
r¦   r(   rº   r   rE   r#   r®   r   r~   Ú
startswith)r   r§   r£   r˜   s       r   Ú"test_assertRaisesContextUnexpectedz=SynchronousAssertionsTests.test_assertRaisesContextUnexpected¥  s(  € ð	TØ×"Ò"¥:Ñ.Ô.ð *ð *Ý Ñ)Ô)Ð)ð*ð *ð *ð *øøøð *ð *ð *ð *ð *ð �IŠIÐRÑSÔSÐSÐSÐSøð Ô$ð 		ð 		ð 		Ý˜)‘n”nˆGØM×UÒUÝ'­	Ñ2Ô2ð Vñ ô ˆHð �OŠOØ×"Ò" 8Ñ,Ô,ðß’V˜G‘_”_ñô ð ð ð ð ð ð ð øøøøð		øøøs.   ‚A œ,¬0°A ³0´A Á
CÁA3CÃCc                 ó  — 	 |                       t          ¦  «        5  	 ddd¦  «         n# 1 swxY w Y   |                      d¦  «         dS # | j        $ r0}t	          |¦  «        }|                      |d¦  «         Y d}~dS d}~ww xY w)zò
        If C{assertRaises} is used to create a context manager and no exception
        is raised from the body of the C{with} statement then the C{with}
        statement raises C{failureException} describing the lack of exception.
        Nz5Non-exception result should have caused test failure.z%ValueError not raised (None returned))r¦   r(   r   rE   r#   rF   )r   r§   r£   s      r   Ú#test_assertRaisesContextNoExceptionz>SynchronousAssertionsTests.test_assertRaisesContextNoException¼  sí   € ð
	OØ×"Ò"¥:Ñ.Ô.ð ð àðð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð �IŠIÐMÑNÔNÐNÐNÐNøð Ô$ð 	Oð 	Oð 	OÝ˜)‘n”nˆGð ×Ò˜WÐ&MÑNÔNÐNÐNÐNÐNÐNÐNÐNøøøøð		Oøøøs2   ‚A œ*žA ª.®A ±.²A Á
BÁ%BÂBc                 óÐ  — 	 |                       t          t          f¦  «        5  t          ¦   «         ‚# 1 swxY w Y   	 |                      d¦  «         dS # | j        $ r†}t          |¦  «        }d|v}d|v}g }|r|                     d¦  «         |r|                     d¦  «         |r2|                      d                     |¦  «        d|› �¦  «         Y d}~dS Y d}~dS d}~ww xY w)	z¾
        If the exception type passed to C{assertRaises} does not have a
        C{__name__} then the context manager still manages to construct a
        descriptive string for it.
        NrÉ   r(   rº   z(expected ValueError in exception messagez'expected TypeError in exception messagez; z
message = )	r¦   r(   rº   ÚAttributeErrorr   rE   r#   Úappendr=   )r   r§   r£   Ú
valueErrorÚ	typeErrorrP   s         r   Útest_brokenNamez*SynchronousAssertionsTests.test_brokenNameÎ  sk  € ð	TØ×"Ò"¥Jµ	Ð#:Ñ;Ô;ð 'ð 'å$Ñ&Ô&Ð&ð'ð 'ð 'ð 'øøøð 'ð 'ð 'ð 'ð 'ð �IŠIÐRÑSÔSÐSÐSÐSøð Ô$ð 
	Eð 
	Eð 
	EÝ˜)‘n”nˆGØ%¨WÐ4ˆJØ#¨7Ð2ˆIØˆFØð JØ—’ÐHÑIÔIÐIØð IØ—’ÐGÑHÔHÐHØð EØ—	’	˜$Ÿ)š) FÑ+Ô+Ð-C¸'Ð-CÐ-CÑDÔDÐDÐDÐDÐDÐDÐDÐDðEð Eð Eð Eð Eð Eøøøøð
	Eøøøs.   ‚!A £2²6¶A ¹6ºA Á
C%ÁA5C Ã C%c                 óú   — dgdgdg}}}|                       ||¦  «        }|                      ||d¦  «         |                      | j        | j         ||¦  «         |                      | j        | j         ||¦  «         d S )NrK   r`   ú)failIfEqual should return first parameter)ÚfailIfEqualrF   rµ   rE   ©r   rŽ   rŸ   r    Úrets        r   Útest_failIfEqual_basicz1SynchronousAssertionsTests.test_failIfEqual_basicæ  s‰   € Ø�#˜�s˜Q˜Cˆaˆ1ˆØ×Ò˜q !Ñ$Ô$ˆØ×Ò˜˜aÐ!LÑMÔMÐMØ×Ò˜dÔ3°TÔ5EÀqÈ!ÑLÔLÐLØ×Ò˜dÔ3°TÔ5EÀqÈ!ÑLÔLÐLÐLÐLr   c                 ó,  — t          d¦  «        }t          d¦  «        }t          d¦  «        }|                      ||¦  «        }|                      ||d¦  «         |                      | j        | j        ||¦  «         |                      ||d¦  «         d S )NrŒ   r�   ÚfecundrÖ   z"__ne__ should make these not equal)r   r×   rF   rµ   rE   rØ   s        r   Útest_failIfEqual_customEqz4SynchronousAssertionsTests.test_failIfEqual_customEqí  s–   € Ý˜Ñ!Ô!ˆÝ˜Ñ"Ô"ˆÝ˜Ñ"Ô"ˆØ×Ò˜q !Ñ$Ô$ˆØ×Ò˜˜aÐ!LÑMÔMÐMØ×Ò˜dÔ3°TÔ5EÀqÈ!ÑLÔLÐLØ×Ò˜˜AÐCÑDÔDÐDÐDÐDr   c                 ó–   — t          ¦   «         }t          ¦   «         }|                      ||¦  «        }|                      ||¦  «         dS )z‚
        C{failIfIdentical} returns its first argument if its first and second
        arguments are not the same object.
        N)ÚobjectÚfailIfIdenticalrF   )r   rŽ   rŸ   rH   s       r   Útest_failIfIdenticalPositivez7SynchronousAssertionsTests.test_failIfIdenticalPositiveö  sG   € õ
 ‰HŒHˆÝ‰HŒHˆØ×%Ò% a¨Ñ+Ô+ˆØ×Ò˜˜FÑ#Ô#Ð#Ð#Ð#r   c                 óf   — t          ¦   «         }|                      | j        | j        ||¦  «         dS )z~
        C{failIfIdentical} raises C{failureException} if its first and second
        arguments are the same object.
        N)rß   rµ   rE   rà   r·   s     r   Útest_failIfIdenticalNegativez7SynchronousAssertionsTests.test_failIfIdenticalNegative   s3   € õ
 ‰HŒHˆØ×Ò˜dÔ3°TÔ5IÈ1ÈaÑPÔPÐPÐPÐPr   c                 óú   — dgdgdg}}}|                       ||¦  «        }|                      ||d¦  «         |                      | j        | j         ||¦  «         |                      | j        | j         ||¦  «         d S )NrK   r`   z1failUnlessIdentical should return first parameter)ÚfailUnlessIdenticalrF   rµ   rE   rØ   s        r   Útest_failUnlessIdenticalz3SynchronousAssertionsTests.test_failUnlessIdentical  s‹   € Ø�#˜�s˜Q˜Cˆaˆ1ˆØ×&Ò& q¨!Ñ,Ô,ˆØ×Ò˜˜aÐ!WÑXÔXÐXØ×Ò˜dÔ3°TÔ5MÈqÐRSÑTÔTÐTØ×Ò˜dÔ3°TÔ5MÈqÐRSÑTÔTÐTÐTÐTr   c                 ó(  — d\  }}}|                       ||d¦  «         |                       ||d¦  «        }|                      ||d¦  «         |                      | j        | j         ||d¦  «         |                      | j        | j         ||d¦  «         d S )N)g      ð?gš™™™™™ñ?g333333ó?gš™™™™™É?z4failUnlessApproximates should return first parametergš™™™™™¹?)ÚfailUnlessApproximatesrF   rµ   rE   rØ   s        r   Útest_failUnlessApproximatesz6SynchronousAssertionsTests.test_failUnlessApproximates  s¼   € Ø‰ˆˆ1ˆaØ×#Ò# A q¨#Ñ.Ô.Ð.Ø×)Ò)¨!¨Q°Ñ4Ô4ˆØ×ÒØ�ÐMñ	
ô 	
ð 	
ð 	×ÒØÔ! 4Ô#>ÀÀ1Àcñ	
ô 	
ð 	
ð 	×ÒØÔ! 4Ô#>ÀÀ1Àcñ	
ô 	
ð 	
ð 	
ð 	
r   c           	      óô   — d}d}d}d}|                       |||¦  «         |                       |||¦  «        }|                      ||d|›d|›d�¦  «         |                      | j        | j         |||¦  «         d S )Né   çAï�!   @çŽX‹O  @çƒÞC   @z5failUnlessAlmostEqual should return first parameter (r‘   r   )ÚfailUnlessAlmostEqualrF   rµ   rE   ©r   Ú	precisionrŽ   rŸ   r    rÙ   s         r   Útest_failUnlessAlmostEqualz5SynchronousAssertionsTests.test_failUnlessAlmostEqual  s¬   € Øˆ	ØˆØˆØˆØ×"Ò" 1 a¨Ñ3Ô3Ð3Ø×(Ò(¨¨A¨yÑ9Ô9ˆØ×ÒØØˆAà*-¨#¨#¨q¨q¨qð2ñ	
ô 	
ð 	
ð 	×ÒØÔ! 4Ô#=¸qÀ!ÀYñ	
ô 	
ð 	
ð 	
ð 	
r   c           	      ó  — d}d}d}d}|                       |||¦  «        }|                      ||d|›d|›d�¦  «         |                      | j        | j         |||¦  «         |                      | j        | j         |||¦  «         d S )Nrë   rì   rí   rî   z1failIfAlmostEqual should return first parameter (r‘   r   )ÚfailIfAlmostEqualrF   rµ   rE   rð   s         r   Útest_failIfAlmostEqualz1SynchronousAssertionsTests.test_failIfAlmostEqual.  sÀ   € Øˆ	ØˆØˆØˆØ×$Ò$ Q¨¨9Ñ5Ô5ˆØ×ÒØØˆAØMPÈSÈSÐRSÐRSÐRSÐTñ	
ô 	
ð 	
ð
 	×ÒØÔ! 4Ô#9¸1¸aÀñ	
ô 	
ð 	
ð 	×ÒØÔ! 4Ô#9¸1¸aÀñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó   — d}d}d}|                       ||¦  «         |                       ||¦  «        }|                      ||d¦  «         |                      | j        | j         ||¦  «         |                      | j        | j         ||¦  «         d S ©Nr_   zthe dog satzthe cat satzshould return first parameter)ÚfailUnlessSubstringrF   rµ   rE   rØ   s        r   Útest_failUnlessSubstringz3SynchronousAssertionsTests.test_failUnlessSubstring@  s�   € ØˆØˆØˆØ× Ò   AÑ&Ô&Ð&Ø×&Ò& q¨!Ñ,Ô,ˆØ×Ò˜˜aÐ!@ÑAÔAÐAØ×Ò˜dÔ3°TÔ5MÈqÐRSÑTÔTÐTØ×Ò˜dÔ3°TÔ5MÈqÐRSÑTÔTÐTÐTÐTr   c                 ó   — d}d}d}|                       ||¦  «         |                       ||¦  «        }|                      ||d¦  «         |                      | j        | j         ||¦  «         |                      | j        | j         ||¦  «         d S r÷   )ÚfailIfSubstringrF   rµ   rE   rØ   s        r   Útest_failIfSubstringz/SynchronousAssertionsTests.test_failIfSubstringJ  s›   € ØˆØˆØˆØ×Ò˜Q Ñ"Ô"Ð"Ø×"Ò" 1 aÑ(Ô(ˆØ×Ò˜˜aÐ!@ÑAÔAÐAØ×Ò˜dÔ3°TÔ5IÈ1ÈaÑPÔPÐPØ×Ò˜dÔ3°TÔ5IÈ1ÈaÑPÔPÐPÐPÐPr   c                 óP   — t          d¦  «        }|                      ||¦  «         dS )zB
        L{assertIs} passes if two objects are identical.
        rŒ   N)r   rÅ   ©r   Úas     r   Útest_assertIsz(SynchronousAssertionsTests.test_assertIsT  s+   € õ ˜Ñ!Ô!ˆØ�Š�a˜ÑÔÐÐÐr   c                 ó²   — t          d¦  «        t          d¦  «        }}|                      ||¦  «         |                      | j        | j        ||¦  «         dS )zE
        L{assertIs} fails if two objects are not identical.
        rŒ   N)r   rF   r¦   rE   rÅ   ©r   rÿ   Úbs      r   Útest_assertIsErrorz-SynchronousAssertionsTests.test_assertIsError[  sX   € õ ˜GÑ$Ô$¥l°7Ñ&;Ô&;ˆ1ˆØ×Ò˜˜AÑÔÐØ×Ò˜$Ô/°´ÀÀ1ÑEÔEÐEÐEÐEr   c                 óš   — t          d¦  «        t          d¦  «        }}|                      ||¦  «         |                      ||¦  «         dS )zI
        L{assertIsNot} passes if two objects are not identical.
        rŒ   N)r   rF   ÚassertIsNotr  s      r   Útest_assertIsNotz+SynchronousAssertionsTests.test_assertIsNotc  sO   € õ ˜GÑ$Ô$¥l°7Ñ&;Ô&;ˆ1ˆØ×Ò˜˜AÑÔÐØ×Ò˜˜AÑÔÐÐÐr   c                 óh   — t          d¦  «        }|                      | j        | j        ||¦  «         dS )zD
        L{assertIsNot} fails if two objects are identical.
        rŒ   N)r   r¦   rE   r  rþ   s     r   Útest_assertIsNotErrorz0SynchronousAssertionsTests.test_assertIsNotErrork  s7   € õ ˜Ñ!Ô!ˆØ×Ò˜$Ô/°Ô1AÀ1ÀaÑHÔHÐHÐHÐHr   c                 ót   — t          dt          fi ¦  «        } |¦   «         }|                      ||¦  «         dS )z<
        Test a true condition of assertIsInstance.
        ÚAN©rÊ   rß   ÚassertIsInstance)r   r  rÿ   s      r   Útest_assertIsInstancez0SynchronousAssertionsTests.test_assertIsInstancer  s>   € õ �•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ×Ò˜a Ñ#Ô#Ð#Ð#Ð#r   c                 ó¦   — t          dt          fi ¦  «        }t          dt          fi ¦  «        } |¦   «         }|                      |||f¦  «         dS )zR
        Test a true condition of assertIsInstance with multiple classes.
        r  ÚBNr  ©r   r  r  rÿ   s       r   Ú$test_assertIsInstanceMultipleClassesz?SynchronousAssertionsTests.test_assertIsInstanceMultipleClassesz  sU   € õ �•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ×Ò˜a ! Q Ñ(Ô(Ð(Ð(Ð(r   c                 óº   — t          dt          fi ¦  «        }t          dt          fi ¦  «        } |¦   «         }|                      | j        | j        ||¦  «         dS )z6
        Test an error with assertIsInstance.
        r  r  N©rÊ   rß   r¦   rE   r  r  s       r   Útest_assertIsInstanceErrorz5SynchronousAssertionsTests.test_assertIsInstanceErrorƒ  s[   € õ �•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ×Ò˜$Ô/°Ô1FÈÈ1ÑMÔMÐMÐMÐMr   c                 óì   — t          dt          fi ¦  «        }t          dt          fi ¦  «        }t          dt          fi ¦  «        } |¦   «         }|                      | j        | j        |||f¦  «         dS )zK
        Test an error with assertIsInstance and multiple classes.
        r  r  ÚCNr  ©r   r  r  r  rÿ   s        r   Ú)test_assertIsInstanceErrorMultipleClasseszDSynchronousAssertionsTests.test_assertIsInstanceErrorMultipleClassesŒ  sr   € õ �•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ×Ò˜$Ô/°Ô1FÈÈAÈqÈ6ÑRÔRÐRÐRÐRr   c                 óœ   — |                       | j        | j        dt          d¦  «        }|                      dt          |¦  «        ¦  «         dS )zÃ
        If L{TestCase.assertIsInstance} is passed a custom message as its 3rd
        argument, the message is included in the failure exception raised when
        the assertion fails.
        rb   zSilly assertionN)r¦   rE   r  r#   rj   )r   Úexcs     r   Ú"test_assertIsInstanceCustomMessagez=SynchronousAssertionsTests.test_assertIsInstanceCustomMessage–  sN   € ð ×ÒØÔ! 4Ô#8¸!½SÐBSñ
ô 
ˆð 	�ŠÐ'­¨S©¬Ñ2Ô2Ð2Ð2Ð2r   c                 ó¢   — t          dt          fi ¦  «        }t          dt          fi ¦  «        } |¦   «         }|                      ||¦  «         dS )z?
        Test a true condition of assertNotIsInstance.
        r  r  N©rÊ   rß   ÚassertNotIsInstancer  s       r   Útest_assertNotIsInstancez3SynchronousAssertionsTests.test_assertNotIsInstance¡  sQ   € õ �•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ× Ò   AÑ&Ô&Ð&Ð&Ð&r   c                 óÔ   — t          dt          fi ¦  «        }t          dt          fi ¦  «        }t          dt          fi ¦  «        } |¦   «         }|                      |||f¦  «         dS )zT
        Test a true condition of assertNotIsInstance and multiple classes.
        r  r  r  Nr  r  s        r   Ú'test_assertNotIsInstanceMultipleClasseszBSynchronousAssertionsTests.test_assertNotIsInstanceMultipleClassesª  sh   € õ �•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ× Ò   Q¨ FÑ+Ô+Ð+Ð+Ð+r   c                 óÜ   — t          dt          fi ¦  «        } |¦   «         }|                      | j        | j        ||¦  «        }|                      t          |¦  «        |›d|› �¦  «         dS )z9
        Test an error with assertNotIsInstance.
        r  z is an instance of N)rÊ   rß   r¦   rE   r  rF   r#   )r   r  rÿ   r²   s       r   Útest_assertNotIsInstanceErrorz8SynchronousAssertionsTests.test_assertNotIsInstanceError´  ss   € õ �•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ×!Ò! $Ô"7¸Ô9QÐSTÐVWÑXÔXˆØ×Ò�˜U™œ¨Ð%CÐ%CÀÐ%CÐ%CÑDÔDÐDÐDÐDr   c                 ó¾   — t          dt          fi ¦  «        }t          dt          fi ¦  «        } |¦   «         }|                      | j        | j        |||f¦  «         dS )zN
        Test an error with assertNotIsInstance and multiple classes.
        r  r  N)rÊ   rß   r¦   rE   r  r  s       r   Ú,test_assertNotIsInstanceErrorMultipleClasseszGSynchronousAssertionsTests.test_assertNotIsInstanceErrorMultipleClasses½  s`   € õ �•v�i Ñ$Ô$ˆÝ�•v�i Ñ$Ô$ˆØˆA‰CŒCˆØ×Ò˜$Ô/°Ô1IÈ1ÈqÐRSÈfÑUÔUÐUÐUÐUr   c                 ó:   — |                       ddiddi¦  «         dS )z–
        L{twisted.trial.unittest.TestCase} supports the C{assertDictEqual}
        method inherited from the standard library in Python 2.7.
        rÿ   rK   N)ÚassertDictEqualr   s    r   Útest_assertDictEqualz/SynchronousAssertionsTests.test_assertDictEqualÆ  s(   € ð
 	×Ò˜c 1˜X¨¨Q xÑ0Ô0Ð0Ð0Ð0r   r(  Nz:assertDictEqual is not available on this version of Python)0r   r    r!   r+   r�   r™   r�   r¡   r¨   r¬   r°   r³   r¸   r»   rÀ   rÂ   rÇ   rÌ   rÎ   rÔ   rÚ   rÝ   rá   rã   ræ   ré   rò   rõ   rù   rü   r   r  r  r	  r  r  r  r  r  r   r"  r$  r&  r)  Úgetattrr   rT   Úskipr$   r   r   rŠ   rŠ     sÜ  € € € € € ð	ð 	ðCð Cð Cð
Qð Qð Qð.-ð -ð -ð$ð $ð $ð	/ð 	/ð 	/ðGð Gð Gðð ð ð"ð ð ð
ð 
ð 
ð	Nð 	Nð 	NðBð Bð Bð6ð 6ð 6ð$4ð 4ð 4ðTð Tð Tð.Oð Oð Oð$Tð Tð Tð0Mð Mð MðEð Eð Eð$ð $ð $ðQð Qð QðUð Uð Uð
ð 
ð 
ð
ð 
ð 
ð"
ð 
ð 
ð$Uð Uð UðQð Qð Qðð ð ðFð Fð Fðð ð ðIð Ið Ið$ð $ð $ð)ð )ð )ðNð Nð NðSð Sð Sð	3ð 	3ð 	3ð'ð 'ð 'ð,ð ,ð ,ðEð Eð EðVð Vð Vð1ð 1ð 1ð €wˆxÔ+Ð->ÀÑEÔEÐMàHð 	Ô!Ð!Ð!ð NÐMr   rŠ   c                   ó\   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ ZdS )ÚWarningAssertionTestsc                 ó~   — d„ }|                       t          dt          |d¦  «        }|                      |d¦  «         dS )z0
        Test basic assertWarns report.
        c                 ó<   — t          j        dt          ¬¦  «         | S ©NúWoo deprecated©Úcategory©ÚwarningsÚwarnÚDeprecationWarning©rÿ   s    r   r   z:WarningAssertionTests.test_assertWarns.<locals>.deprecatedÙ  ó   € ÝŒMÐ*Õ5GÐHÑHÔHÐHØˆHr   r1  é{   N©ÚassertWarnsr7  Ú__file__rF   ©r   r   Úrs      r   Útest_assertWarnsz&WarningAssertionTests.test_assertWarnsÔ  sR   € ð
	ð 	ð 	ð ×ÒÝÐ 0µ(¸JÈñ
ô 
ˆð 	×Ò˜˜CÑ Ô Ð Ð Ð r   c                 óð   — d„ }|                       t          dt          |d¦  «        }|                      |d¦  «         |                       t          dt          |d¦  «        }|                      |d¦  «         dS )z}
        Test that assertWarns cleans the warning registry, so the warning is
        not swallowed the second time.
        c                 ó<   — t          j        dt          ¬¦  «         | S r0  r4  r8  s    r   r   zGWarningAssertionTests.test_assertWarnsRegistryClean.<locals>.deprecatedè  r9  r   r1  r:  éA  Nr;  )r   r   Úr1Úr2s       r   Útest_assertWarnsRegistryCleanz3WarningAssertionTests.test_assertWarnsRegistryCleanâ  s‹   € ð	ð 	ð 	ð ×ÒÝÐ 0µ(¸JÈñ
ô 
ˆð 	×Ò˜˜SÑ!Ô!Ð!à×ÒÝÐ 0µ(¸JÈñ
ô 
ˆð 	×Ò˜˜SÑ!Ô!Ð!Ð!Ð!r   c           	      ój   — d„ }|                       | j        | j        t          dt          |d¦  «         dS )zH
        Test assertWarns failure when no warning is generated.
        c                 ó   — | S r   r$   r8  s    r   Únormalz;WarningAssertionTests.test_assertWarnsError.<locals>.normalû  s   € ØˆHr   r1  r:  N©r¦   rE   r<  r7  r=  )r   rI  s     r   Útest_assertWarnsErrorz+WarningAssertionTests.test_assertWarnsErrorö  sP   € ð
	ð 	ð 	ð 	×ÒØÔ!ØÔÝØÝØØñ	
ô 	
ð 	
ð 	
ð 	
r   c           	      ój   — d„ }|                       | j        | j        t          dt          |d¦  «         dS )zF
        Test assertWarns failure when the category is wrong.
        c                 ó<   — t          j        dt          ¬¦  «         | S ©NúFoo deprecatedr2  r4  r8  s    r   r   zGWarningAssertionTests.test_assertWarnsWrongCategory.<locals>.deprecated  r9  r   rO  r:  N)r¦   rE   r<  ÚUserWarningr=  ©r   r   s     r   Útest_assertWarnsWrongCategoryz3WarningAssertionTests.test_assertWarnsWrongCategory  sP   € ð
	ð 	ð 	ð 	×ÒØÔ!ØÔÝØÝØØñ	
ô 	
ð 	
ð 	
ð 	
r   c           	      ój   — d„ }|                       | j        | j        t          dt          |d¦  «         dS )zE
        Test assertWarns failure when the message is wrong.
        c                 ó<   — t          j        dt          ¬¦  «         | S rN  r4  r8  s    r   r   zFWarningAssertionTests.test_assertWarnsWrongMessage.<locals>.deprecated   r9  r   úBar deprecatedr:  NrJ  rQ  s     r   Útest_assertWarnsWrongMessagez2WarningAssertionTests.test_assertWarnsWrongMessage  sP   € ð
	ð 	ð 	ð 	×ÒØÔ!ØÔÝØÝØØñ	
ô 	
ð 	
ð 	
ð 	
r   c           	      ój   — d„ }|                       | j        | j        t          dt          |d¦  «         dS )zš
        If the warning emitted by a function refers to a different file than is
        passed to C{assertWarns}, C{failureException} is raised.
        c                 ó>   — t          j        dt          d¬¦  «         d S )NrO  r`   )r3  Ú
stacklevelr4  r8  s    r   r   zCWarningAssertionTests.test_assertWarnsWrongFile.<locals>.deprecated4  s$   € õ ŒMÐ*Õ5GÐTUÐVÑVÔVÐVÐVÐVr   rO  r:  NrJ  rQ  s     r   Útest_assertWarnsWrongFilez/WarningAssertionTests.test_assertWarnsWrongFile.  sU   € ð
	Wð 
	Wð 
	Wð 	×ÒØÔ!ð ÔÝØÝØØñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó4  —  G d„ d¦  «        }|                       t          dt          |¦  «        }|                      t	          ||¦  «        ¦  «         |                       t          dt          |¦  «        }|                      t	          ||¦  «        ¦  «         dS )zH
        Test assertWarns works when creating a class instance.
        c                   ó   — e Zd Zd„ ZdS )ú;WarningAssertionTests.test_assertWarnsOnClass.<locals>.Warnc                 ó<   — t          j        dt          ¬¦  «         d S )NúDo not call mer2  )r5  r6  ÚRuntimeWarningr   s    r   r   zDWarningAssertionTests.test_assertWarnsOnClass.<locals>.Warn.__init__S  s   € Ý”Ð.½ÐHÑHÔHÐHÐHÐHr   N)r   r    r!   r   r$   r   r   ÚWarnr]  R  s(   € € € € € ðIð Ið Ið Ið Ir   ra  r_  N)r<  r`  r=  r~   r¶   )r   ra  r?  s      r   Útest_assertWarnsOnClassz-WarningAssertionTests.test_assertWarnsOnClassM  s¦   € ð
	Ið 	Ið 	Ið 	Ið 	Iñ 	Iô 	Ið 	Ið ×Ò�^Ð-=½xÈÑNÔNˆØ�Š�
 1 dÑ+Ô+Ñ,Ô,Ð,Ø×Ò�^Ð-=½xÈÑNÔNˆØ�Š�
 1 dÑ+Ô+Ñ,Ô,Ð,Ð,Ð,r   c                 ó,  —  G d„ d¦  «        } |¦   «         }|                       t          dt          |j        d¦  «        }|                      |d¦  «         |                       t          dt          |j        d¦  «        }|                      |d¦  «         dS )zI
        Test assertWarns works when used on an instance method.
        c                   ó   — e Zd Zd„ ZdS )ú<WarningAssertionTests.test_assertWarnsOnMethod.<locals>.Warnc                 ó<   — t          j        dt          ¬¦  «         |S )NrU  r2  r4  rþ   s     r   r   zGWarningAssertionTests.test_assertWarnsOnMethod.<locals>.Warn.deprecateda  ó   € Ý”Ð.Õ9KÐLÑLÔLÐLØ�r   N)r   r    r!   r   r$   r   r   ra  re  `  ó#   € € € € € ðð ð ð ð r   ra  rU  rC  N)r<  r7  r=  r   rF   ©r   ra  Úwr?  s       r   Útest_assertWarnsOnMethodz.WarningAssertionTests.test_assertWarnsOnMethod[  s³   € ð
	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð
 ˆD‰FŒFˆØ×ÒÝÐ 0µ(¸A¼LÈ#ñ
ô 
ˆð 	×Ò˜˜CÑ Ô Ð Ø×ÒÝÐ 0µ(¸A¼LÈ#ñ
ô 
ˆð 	×Ò˜˜CÑ Ô Ð Ð Ð r   c                 ó  —  G d„ d¦  «        } |¦   «         }|                       t          dt          |d¦  «        }|                      |d¦  «         |                       t          dt          |d¦  «        }|                      |d¦  «         dS )zM
        Test assertWarns works on instance with C{__call__} method.
        c                   ó   — e Zd Zd„ ZdS )ú:WarningAssertionTests.test_assertWarnsOnCall.<locals>.Warnc                 ó<   — t          j        dt          ¬¦  «         |S )NúEgg deprecatedr2  r4  rþ   s     r   Ú__call__zCWarningAssertionTests.test_assertWarnsOnCall.<locals>.Warn.__call__u  rg  r   N)r   r    r!   rq  r$   r   r   ra  rn  t  rh  r   ra  rp  rC  Nr;  ri  s       r   Útest_assertWarnsOnCallz,WarningAssertionTests.test_assertWarnsOnCallo  s¥   € ð
	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð
 ˆD‰FŒFˆØ×ÒÕ/Ð1AÅ8ÈQÐPSÑTÔTˆØ×Ò˜˜CÑ Ô Ð Ø×ÒÕ/Ð1AÅ8ÈQÐPSÑTÔTˆØ×Ò˜˜CÑ Ô Ð Ð Ð r   c                 ó~   — d„ }|                       t          dt          |d¦  «        }|                      |d¦  «         dS )zD
        Test assertWarns on a warning filtered by default.
        c                 ó<   — t          j        dt          ¬¦  «         | S r0  ©r5  r6  ÚPendingDeprecationWarningr8  s    r   r   z@WarningAssertionTests.test_assertWarnsFilter.<locals>.deprecated„  s   € ÝŒMÐ*Õ5NÐOÑOÔOÐOØˆHr   r1  r:  N)r<  rv  r=  rF   r>  s      r   Útest_assertWarnsFilterz,WarningAssertionTests.test_assertWarnsFilter  sR   € ð
	ð 	ð 	ð ×ÒÝ%Ð'7½À:Èsñ
ô 
ˆð 	×Ò˜˜CÑ Ô Ð Ð Ð r   c                 ó\   ‡— d„ Šˆfd„}|                       t          dt          |¦  «         dS )z‹
        C{assertWarns} does not raise an exception if the function it is passed
        triggers the same warning more than once.
        c                  ó<   — t          j        dt          ¬¦  «         d S r0  ru  r$   r   r   r   zJWarningAssertionTests.test_assertWarnsMultipleWarnings.<locals>.deprecated“  s   € ÝŒMÐ*Õ5NÐOÑOÔOÐOÐOÐOr   c                  ó0   •—  ‰ ¦   «           ‰ ¦   «          d S r   r$   )r   s   €r   ÚfzAWarningAssertionTests.test_assertWarnsMultipleWarnings.<locals>.f–  s   ø€ ØˆJ‰LŒLˆLØˆJ‰LŒLˆLˆLˆLr   r1  N)r<  rv  r=  )r   r{  r   s     @r   Ú test_assertWarnsMultipleWarningsz6WarningAssertionTests.test_assertWarnsMultipleWarnings�  sS   ø€ ð	Pð 	Pð 	Pð	ð 	ð 	ð 	ð 	ð 	×ÒÕ2Ð4DÅhÐPQÑRÔRÐRÐRÐRr   c           	      ó°   — d„ }|                       | j        | j        t          dt          |d¦  «        }|                      t          |¦  «        d¦  «         dS )z‘
        For now, assertWarns is unable to handle multiple different warnings,
        so it should raise an exception if it's the case.
        c                 ór   — t          j        dt          ¬¦  «         t          j        dt          ¬¦  «         d S )Nr1  r2  zAnother one)r5  r6  r7  rv  r8  s    r   r   zKWarningAssertionTests.test_assertWarnsDifferentWarnings.<locals>.deprecated¢  s5   € ÝŒMÐ*Õ5GÐHÑHÔHÐHÝŒM˜-Õ2KÐLÑLÔLÐLÐLÐLr   r1  r:  zCan't handle different warningsN)r¦   rE   r<  r7  r=  rF   r#   )r   r   rl   s      r   Ú!test_assertWarnsDifferentWarningsz7WarningAssertionTests.test_assertWarnsDifferentWarningsœ  sk   € ð	Mð 	Mð 	Mð ×ÒØÔ!ØÔÝØÝØØñ
ô 
ˆð 	×Ò�˜Q™œÐ!BÑCÔCÐCÐCÐCr   c                 óò   ‡—  G d„ dt           ¦  «        Šˆfd„} |d¦  «         |                      ‰dt          |d¦  «         |                      |g¦  «        \  }|                      |d         d¦  «         dS )z 
        Warnings emitted before L{TestCase.assertWarns} is called do not get
        flushed and do not alter the behavior of L{TestCase.assertWarns}.
        c                   ó   — e Zd ZdS )úPWarningAssertionTests.test_assertWarnsAfterUnassertedWarning.<locals>.TheWarningN)r   r    r!   r$   r   r   Ú
TheWarningr‚  ·  s   € € € € € ØˆDr   rƒ  c                 ó4   •— t          j        | ‰¬¦  «         d S )Nr2  )r5  r6  )r£   rƒ  s    €r   r{  zGWarningAssertionTests.test_assertWarnsAfterUnassertedWarning.<locals>.fº  s   ø€ ÝŒM˜'¨JÐ7Ñ7Ô7Ð7Ð7Ð7r   r¤   r¥   r£   N)ÚWarningr<  r=  ÚflushWarningsrF   )r   r{  Úwarningrƒ  s      @r   Ú&test_assertWarnsAfterUnassertedWarningz<WarningAssertionTests.test_assertWarnsAfterUnassertedWarning±  s©   ø€ ð	ð 	ð 	ð 	ð 	�ñ 	ô 	ð 	ð	8ð 	8ð 	8ð 	8ð 	8ð 	
ˆˆ%‰ŒˆØ×Ò˜ U­H°a¸Ñ?Ô?Ð?Ø×&Ò&¨ sÑ+Ô+‰	ˆØ×Ò˜ Ô+¨UÑ3Ô3Ð3Ð3Ð3r   N)r   r    r!   r@  rF  rK  rR  rV  rZ  rb  rk  rr  rw  r|  r  rˆ  r$   r   r   r-  r-  Ó  sÝ   € € € € € ð!ð !ð !ð"ð "ð "ð(
ð 
ð 
ð$
ð 
ð 
ð&
ð 
ð 
ð&
ð 
ð 
ð>-ð -ð -ð!ð !ð !ð(!ð !ð !ð !ð !ð !ðSð Sð SðDð Dð Dð*4ð 4ð 4ð 4ð 4r   r-  c                   óÀ   — e Zd ZdZ e¦   «         Z e ed¦  «        ¦  «        Zd„ Z	d„ Z
d„ Zd„ Zd„ Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚResultOfAssertionsTestsz–
    Tests for L{SynchronousTestCase.successResultOf},
    L{SynchronousTestCase.failureResultOf}, and
    L{SynchronousTestCase.assertNoResult}.
    ú	Bad timesc                 ó`   — |                       | j        | j        t          ¦   «         ¦  «         dS )z®
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with no current result.
        N)r¦   rE   ÚsuccessResultOfr   r   s    r   Útest_withoutResultz*ResultOfAssertionsTests.test_withoutResultÍ  ó,   € ð 	×Ò˜$Ô/°Ô1EÅxÁzÄzÑRÔRÐRÐRÐRr   c                 ól   — |                       | j        | j        t          | j        ¦  «        ¦  «         dS )z­
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with a failure result.
        N)r¦   rE   r�  r   Úfailurer   s    r   Útest_successResultOfWithFailurez7ResultOfAssertionsTests.test_successResultOfWithFailureÕ  s=   € ð 	×ÒØÔ! 4Ô#7½¸d¼lÑ9KÔ9Kñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óú   — 	 |                       t          | j        ¦  «        ¦  «         dS # | j        $ rE}|                      | j                             ¦   «         t          |¦  «        ¦  «         Y d}~dS d}~ww xY w)z×
        L{SynchronousTestCase.successResultOf} raises a
        L{SynchronousTestCase.failureException} that has the original failure
        traceback when called with a L{Deferred} with a failure result.
        N)r�  r   r‘  rE   rj   ÚgetTracebackr#   ©r   rl   s     r   Ú+test_successResultOfWithFailureHasTracebackzCResultOfAssertionsTests.test_successResultOfWithFailureHasTracebackß  s‡   € ð	?Ø× Ò ¥ d¤lÑ!3Ô!3Ñ4Ô4Ð4Ð4Ð4øØÔ$ð 	?ð 	?ð 	?Ø�MŠM˜$œ,×3Ò3Ñ5Ô5µs¸1±v´vÑ>Ô>Ð>Ð>Ð>Ð>Ð>Ð>Ð>øøøøð	?øøøs   ‚'+ «
A:µ:A5Á5A:c                 ó`   — |                       | j        | j        t          ¦   «         ¦  «         dS )z®
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with no current result.
        N)r¦   rE   ÚfailureResultOfr   r   s    r   Ú!test_failureResultOfWithoutResultz9ResultOfAssertionsTests.test_failureResultOfWithoutResultê  r�  r   c                 ól   — |                       | j        | j        t          | j        ¦  «        ¦  «         dS )z­
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with a success result.
        N)r¦   rE   r˜  r   rH   r   s    r   Útest_failureResultOfWithSuccessz7ResultOfAssertionsTests.test_failureResultOfWithSuccessò  s=   € ð 	×ÒØÔ! 4Ô#7½ÀÄÑ9MÔ9Mñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óx   — |                       | j        | j        t          | j        ¦  «        t
          ¦  «         dS )zÏ
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        that fails with an exception type that was not expected.
        N)r¦   rE   r˜  r   r‘  ÚKeyErrorr   s    r   Ú$test_failureResultOfWithWrongFailurez<ResultOfAssertionsTests.test_failureResultOfWithWrongFailureü  s?   € ð 	×ÒØÔ! 4Ô#7½¸d¼lÑ9KÔ9KÍXñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó(  — 	 |                       t          | j        ¦  «        t          ¦  «         dS # | j        $ rV}|                      d                     t          j        t          j        ¦  «        t          |¦  «        ¦  «         Y d}~dS d}~ww xY w)a=  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        that fails with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the expected
        exception type.
        ú#Failure of type ({}.{}) expected onN)
r˜  r   r‘  r�  rE   rj   r®   r    r   r#   r•  s     r   Ú6test_failureResultOfWithWrongFailureOneExpectedFailurezNResultOfAssertionsTests.test_failureResultOfWithWrongFailureOneExpectedFailure  s¬   € ð	Ø× Ò ¥ d¤lÑ!3Ô!3µXÑ>Ô>Ð>Ð>Ð>øØÔ$ð 	ð 	ð 	Ø�MŠMØ5×<Ò<ÝÔ'­Ô):ñô õ �A‘”ñ	ô ð ð ð ð ð ð ð øøøøð	øøøó   ‚-1 ±
B»ABÂBc                 ó  — 	 |                       t          | j        ¦  «        t          ¦  «         dS # | j        $ rE}|                      | j                             ¦   «         t          |¦  «        ¦  «         Y d}~dS d}~ww xY w)a@  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        that fails with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the original
        failure traceback.
        N)r˜  r   r‘  r�  rE   rj   r”  r#   r•  s     r   Ú;test_failureResultOfWithWrongFailureOneExpectedFailureHasTBzSResultOfAssertionsTests.test_failureResultOfWithWrongFailureOneExpectedFailureHasTB  s‰   € ð	?Ø× Ò ¥ d¤lÑ!3Ô!3µXÑ>Ô>Ð>Ð>Ð>øØÔ$ð 	?ð 	?ð 	?Ø�MŠM˜$œ,×3Ò3Ñ5Ô5µs¸1±v´vÑ>Ô>Ð>Ð>Ð>Ð>Ð>Ð>Ð>øøøøð	?øøøs   ‚-1 ±
B »:A;Á;B c           	      ó`  — 	 |                       t          | j        ¦  «        t          t          ¦  «         dS # | j        $ rl}|                      d                     t          j        t          j	        t          j        t          j	        ¦  «        t          |¦  «        ¦  «         Y d}~dS d}~ww xY w)aH  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the expected
        exception types in the error message.
        ú,Failure of type ({}.{} or {}.{}) expected onN)r˜  r   r‘  r�  ÚIOErrorrE   rj   r®   r    r   r#   r•  s     r   Ú9test_failureResultOfWithWrongFailureMultiExpectedFailureszQResultOfAssertionsTests.test_failureResultOfWithWrongFailureMultiExpectedFailures%  s»   € ð	Ø× Ò ¥ d¤lÑ!3Ô!3µX½wÑGÔGÐGÐGÐGøØÔ$ð 		ð 		ð 		Ø�MŠMØ>×EÒEÝÔ'ÝÔ%ÝÔ&ÝÔ$ñ	ô õ �A‘”ñô ð ð ð ð ð ð ð øøøøð		øøøó   ‚37 ·
B-ÁA!B(Â(B-c                 ó  — 	 |                       t          | j        ¦  «        t          t          ¦  «         dS # | j        $ rE}|                      | j                             ¦   «         t          |¦  «        ¦  «         Y d}~dS d}~ww xY w)aJ  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the original
        failure traceback in the error message.
        N)	r˜  r   r‘  r�  r§  rE   rj   r”  r#   r•  s     r   Ú>test_failureResultOfWithWrongFailureMultiExpectedFailuresHasTBzVResultOfAssertionsTests.test_failureResultOfWithWrongFailureMultiExpectedFailuresHasTB:  s‹   € ð	?Ø× Ò ¥ d¤lÑ!3Ô!3µX½wÑGÔGÐGÐGÐGøØÔ$ð 	?ð 	?ð 	?Ø�MŠM˜$œ,×3Ò3Ñ5Ô5µs¸1±v´vÑ>Ô>Ð>Ð>Ð>Ð>Ð>Ð>Ð>øøøøð	?øøøs   ‚37 ·
BÁ:BÂBc                 ó†   — |                       | j        |                      t          | j        ¦  «        ¦  «        ¦  «         dS )a  
        When passed a L{Deferred} which currently has a result (ie,
        L{Deferred.addCallback} would cause the added callback to be called
        before C{addCallback} returns), L{SynchronousTestCase.successResultOf}
        returns that result.
        N)ÚassertIdenticalrH   r�  r   r   s    r   Ú%test_successResultOfWithSuccessResultz=ResultOfAssertionsTests.test_successResultOfWithSuccessResultG  s:   € ð 	×Ò˜Tœ[¨$×*>Ò*>½wÀtÄ{Ñ?SÔ?SÑ*TÔ*TÑUÔUÐUÐUÐUr   c                 ó¨   — |                       | j        |                      t          | j        ¦  «        | j        j        t
          ¦  «        ¦  «         dS )a=  
        When passed a L{Deferred} which currently has a L{Failure} result (ie,
        L{Deferred.addErrback} would cause the added errback to be called
        before C{addErrback} returns), L{SynchronousTestCase.failureResultOf}
        returns that L{Failure} if its contained exception type is expected.
        N)r­  r‘  r˜  r   rÊ   r�  r   s    r   Ú-test_failureResultOfWithExpectedFailureResultzEResultOfAssertionsTests.test_failureResultOfWithExpectedFailureResultP  sO   € ð 	×ÒØŒLØ× Ò ¥ d¤lÑ!3Ô!3°T´\Ô5FÍÑQÔQñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó†   — |                       | j        |                      t          | j        ¦  «        ¦  «        ¦  «         dS )a  
        When passed a L{Deferred} which currently has a L{Failure} result
        (ie, L{Deferred.addErrback} would cause the added errback to be called
        before C{addErrback} returns), L{SynchronousTestCase.failureResultOf}
        returns that L{Failure}.
        N)r­  r‘  r˜  r   r   s    r   Ú%test_failureResultOfWithFailureResultz=ResultOfAssertionsTests.test_failureResultOfWithFailureResult\  s:   € ð 	×Ò˜Tœ\¨4×+?Ò+?ÅÀTÄ\Ñ@RÔ@RÑ+SÔ+SÑTÔTÐTÐTÐTr   c                 ól   — |                       | j        | j        t          | j        ¦  «        ¦  «         dS )z×
        When passed a L{Deferred} which currently has a success result (see
        L{test_withSuccessResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r¦   rE   ÚassertNoResultr   rH   r   s    r   Útest_assertNoResultSuccessz2ResultOfAssertionsTests.test_assertNoResultSuccesse  s=   € ð 	×ÒØÔ! 4Ô#6½ÀÄÑ8LÔ8Lñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ól   — |                       | j        | j        t          | j        ¦  «        ¦  «         dS )z×
        When passed a L{Deferred} which currently has a failure result (see
        L{test_withFailureResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r¦   rE   r´  r   r‘  r   s    r   Útest_assertNoResultFailurez2ResultOfAssertionsTests.test_assertNoResultFailureo  s=   € ð 	×ÒØÔ! 4Ô#6½¸T¼\Ñ8JÔ8Jñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óH   — |                       t          ¦   «         ¦  «         dS )zŽ
        When passed a L{Deferred} with no current result,
        L{SynchronousTestCase.assertNoResult} does not raise an exception.
        N)r´  r   r   s    r   Útest_assertNoResultz+ResultOfAssertionsTests.test_assertNoResulty  s"   € ð
 	×Ò�H™JœJÑ'Ô'Ð'Ð'Ð'r   c                 óÜ   — t          ¦   «         }|                      |¦  «         |                     | j        ¦  «         |                      | j        |                      |¦  «        ¦  «         dS )zÒ
        When passed a L{Deferred} with no current result, which is then
        fired with a success result, L{SynchronousTestCase.assertNoResult}
        doesn't modify the result of the L{Deferred}.
        N©r   r´  ÚcallbackrH   rF   r�  ©r   Úds     r   Ú$test_assertNoResultPropagatesSuccessz<ResultOfAssertionsTests.test_assertNoResultPropagatesSuccess€  sa   € õ ‰JŒJˆØ×Ò˜AÑÔÐØ	�
Š
�4”;ÑÔÐØ×Ò˜œ d×&:Ò&:¸1Ñ&=Ô&=Ñ>Ô>Ð>Ð>Ð>r   c                 óÜ   — t          ¦   «         }|                      |¦  «         |                     | j        ¦  «         |                      | j        |                      |¦  «        ¦  «         dS )zÕ
        When passed a L{Deferred} with no current result, which is then
        fired with a L{Failure} result, L{SynchronousTestCase.assertNoResult}
        doesn't modify the result of the L{Deferred}.
        N)r   r´  Úerrbackr‘  rF   r˜  r½  s     r   Ú)test_assertNoResultPropagatesLaterFailurezAResultOfAssertionsTests.test_assertNoResultPropagatesLaterFailure‹  sa   € õ ‰JŒJˆØ×Ò˜AÑÔÐØ	�	Š	�$”,ÑÔÐØ×Ò˜œ t×';Ò';¸AÑ'>Ô'>Ñ?Ô?Ð?Ð?Ð?r   c                 óÎ   — t          | j        ¦  «        }	 |                      |¦  «         n# | j        $ r Y nw xY w|                      d|                      |¦  «        ¦  «         dS )ú¾
        When passed a L{Deferred} which currently has a L{Failure} result,
        L{SynchronousTestCase.assertNoResult} changes the result of the
        L{Deferred} to a success.
        N©r   r‘  r´  rE   rF   r�  r½  s     r   Ú+test_assertNoResultSwallowsImmediateFailurezCResultOfAssertionsTests.test_assertNoResultSwallowsImmediateFailure–  s|   € õ �”ÑÔˆð	Ø×Ò Ñ"Ô"Ð"Ð"øØÔ$ð 	ð 	ð 	ØˆDð	øøøà×Ò˜˜t×3Ò3°AÑ6Ô6Ñ7Ô7Ð7Ð7Ð7s   –, ¬
9¸9N)r   r    r!   r+   rß   rH   r
   Ú	Exceptionr‘  rŽ  r’  r–  r™  r›  rž  r¡  r¤  r¨  r«  r®  r°  r²  rµ  r·  r¹  r¿  rÂ  rÆ  r$   r   r   rŠ  rŠ  Ã  sp  € € € € € ðð ð ˆV‰XŒX€FØˆg�i�i Ñ,Ô,Ñ-Ô-€GðSð Sð Sð
ð 
ð 
ð	?ð 	?ð 	?ðSð Sð Sð
ð 
ð 
ð
ð 
ð 
ðð ð ð$?ð ?ð ?ðð ð ð*?ð ?ð ?ðVð Vð Vð

ð 

ð 

ðUð Uð Uð
ð 
ð 
ð
ð 
ð 
ð(ð (ð (ð	?ð 	?ð 	?ð	@ð 	@ð 	@ð8ð 8ð 8ð 8ð 8r   rŠ  c                   óØ   — e Zd ZdZ e¦   «         Z ed¦  «        Z ee¦  «        Z	d„ Z
d„ Zdd„Zd„ Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú ResultOfCoroutineAssertionsTestsz­
    Tests for L{SynchronousTestCase.successResultOf},
    L{SynchronousTestCase.failureResultOf}, and
    L{SynchronousTestCase.assertNoResult} when given a coroutine.
    r‹  c              ƒ   ó   K  — | j         S r   )rH   r   s    r   ÚsuccessResultz.ResultOfCoroutineAssertionsTests.successResult¯  s   è è € ØŒ{Ðr   c              ƒ   ó2   K  — t          ¦   «         ƒ d {V —† d S r   )r   r   s    r   ÚnoCurrentResultz0ResultOfCoroutineAssertionsTests.noCurrentResult²  s(   è è € Ý‰jŒjÐÐÐÐÐÐÐÐÐr   Nc              ƒ   ó   K  — |€| j         }|‚r   )r§   ©r   r§   s     r   ÚraisesExceptionz0ResultOfCoroutineAssertionsTests.raisesExceptionµ  s   è è € ØÐØœˆIØˆr   c                 ól   — |                       | j        | j        |                      ¦   «         ¦  «         dS )z¬
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        with no current result.
        N)r¦   rE   r�  rÍ  r   s    r   rŽ  z3ResultOfCoroutineAssertionsTests.test_withoutResultº  ó?   € ð 	×ÒØÔ! 4Ô#7¸×9MÒ9MÑ9OÔ9Oñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ól   — |                       | j        | j        |                      ¦   «         ¦  «         dS )z®
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception.
        N)r¦   rE   r�  rÐ  r   s    r   Ú!test_successResultOfWithExceptionzBResultOfCoroutineAssertionsTests.test_successResultOfWithExceptionÄ  rÒ  r   c                 ó2  — t          d¦  «        }	 |                      |                      |¦  «        ¦  «         dS # | j        $ rQ}|                      dt          |¦  «        ¦  «         |                      dt          |¦  «        ¦  «         Y d}~dS d}~ww xY w)zÕ
        L{SynchronousTestCase.successResultOf} raises a
        L{SynchronousTestCase.failureException} that has the original failure
        traceback when called with a coroutine with a failure result.
        r‹  zSuccess result expected onúbuiltins.Exception: Bad timesN)rÇ  r�  rÐ  rE   rj   r#   ©r   r§   rl   s      r   r–  zLResultOfCoroutineAssertionsTests.test_successResultOfWithFailureHasTracebackÎ  s­   € õ ˜kÑ*Ô*ˆ	ð	CØ× Ò  ×!5Ò!5°iÑ!@Ô!@ÑAÔAÐAÐAÐAøØÔ$ð 	Cð 	Cð 	CØ�MŠMÐ6½¸A¹¼Ñ?Ô?Ð?Ø�MŠMÐ9½3¸q¹6¼6ÑBÔBÐBÐBÐBÐBÐBÐBÐBøøøøð	Cøøøs   ‘(; »
BÁABÂBc                 ól   — |                       | j        | j        |                      ¦   «         ¦  «         dS )z¬
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        with no current result.
        N)r¦   rE   r˜  rÍ  r   s    r   r™  zBResultOfCoroutineAssertionsTests.test_failureResultOfWithoutResultÛ  rÒ  r   c                 ól   — |                       | j        | j        |                      ¦   «         ¦  «         dS )z«
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        with a success result.
        N)r¦   rE   r˜  rË  r   s    r   r›  z@ResultOfCoroutineAssertionsTests.test_failureResultOfWithSuccesså  s?   € ð 	×ÒØÔ! 4Ô#7¸×9KÒ9KÑ9MÔ9Mñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óx   — |                       | j        | j        |                      ¦   «         t          ¦  «         dS )zÄ
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception that was not expected.
        N)r¦   rE   r˜  rÐ  r�  r   s    r   rž  zEResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongFailureï  sD   € ð 	×ÒØÔ!ØÔ Ø× Ò Ñ"Ô"Ýñ		
ô 	
ð 	
ð 	
ð 	
r   c                 ó(  — 	 |                       |                      ¦   «         t          ¦  «         dS # | j        $ rV}|                      d                     t          j        t          j        ¦  «        t          |¦  «        ¦  «         Y d}~dS d}~ww xY w)aF  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception with a failure type that was not expected, and
        the L{SynchronousTestCase.failureException} message contains the
        expected exception type.
        r   N)	r˜  rÐ  r�  rE   rj   r®   r    r   r#   r•  s     r   Ú:test_failureResultOfWithWrongExceptionOneExpectedExceptionz[ResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionOneExpectedExceptionü  s®   € ð	Ø× Ò  ×!5Ò!5Ñ!7Ô!7½ÑBÔBÐBÐBÐBøØÔ$ð 	ð 	ð 	Ø�MŠMØ5×<Ò<ÝÔ'­Ô):ñô õ �A‘”ñ	ô ð ð ð ð ð ð ð øøøøð	øøør¢  c                 ó>  — t          d¦  «        }	 |                      |                      |¦  «        t          ¦  «         dS # | j        $ rQ}|                      dt          |¦  «        ¦  «         |                      dt          |¦  «        ¦  «         Y d}~dS d}~ww xY w)aK  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception with a failure type that was not expected, and
        the L{SynchronousTestCase.failureException} message contains the
        original exception traceback.
        r‹  z/Failure of type (builtins.KeyError) expected onrÖ  N)rÇ  r˜  rÐ  r�  rE   rj   r#   r×  s      r   Ú?test_failureResultOfWithWrongExceptionOneExpectedExceptionHasTBz`ResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionOneExpectedExceptionHasTB  s°   € õ ˜kÑ*Ô*ˆ	ð	CØ× Ò  ×!5Ò!5°iÑ!@Ô!@Å(ÑKÔKÐKÐKÐKøØÔ$ð 	Cð 	Cð 	CØ�MŠMÐKÍSÐQRÉVÌVÑTÔTÐTØ�MŠMÐ9½3¸q¹6¼6ÑBÔBÐBÐBÐBÐBÐBÐBÐBøøøøð	Cøøøs   ‘.A Á
BÁABÂBc           	      ó`  — 	 |                       |                      ¦   «         t          t          ¦  «         dS # | j        $ rl}|                      d                     t          j        t          j        t          j        t          j        ¦  «        t          |¦  «        ¦  «         Y d}~dS d}~ww xY w)aN  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception of a type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains expected
        exception types in the error message.
        r¦  N)
r˜  rÐ  r�  r§  rE   rj   r®   r    r   r#   r•  s     r   Ú=test_failureResultOfWithWrongExceptionMultiExpectedExceptionsz^ResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionMultiExpectedExceptions  s½   € ð	Ø× Ò  ×!5Ò!5Ñ!7Ô!7½Å7ÑKÔKÐKÐKÐKøØÔ$ð 		ð 		ð 		Ø�MŠMØ>×EÒEÝÔ'ÝÔ%ÝÔ&ÝÔ$ñ	ô õ �A‘”ñô ð ð ð ð ð ð ð øøøøð		øøør©  c                 óJ  — t          d¦  «        }	 |                      |                      |¦  «        t          t          ¦  «         dS # | j        $ rQ}|                      dt          |¦  «        ¦  «         |                      dt          |¦  «        ¦  «         Y d}~dS d}~ww xY w)aV  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception of a type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the original
        exception traceback in the error message.
        r‹  zCFailure of type (builtins.KeyError or builtins.OSError) expected onrÖ  N)rÇ  r˜  rÐ  r�  r§  rE   rj   r#   r×  s      r   ÚBtest_failureResultOfWithWrongExceptionMultiExpectedExceptionsHasTBzcResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionMultiExpectedExceptionsHasTB2  sº   € õ ˜kÑ*Ô*ˆ	ð	CØ× Ò  ×!5Ò!5°iÑ!@Ô!@Å(ÍGÑTÔTÐTÐTÐTøØÔ$ð 	Cð 	Cð 	CØ�MŠMØUÝ�A‘”ñô ð ð �MŠMÐ9½3¸q¹6¼6ÑBÔBÐBÐBÐBÐBÐBÐBÐBøøøøð	Cøøøs   ‘4A Á
B"ÁABÂB"c                 ó†   — |                       | j        |                      |                      ¦   «         ¦  «        ¦  «         dS )a$  
        When passed a coroutine which currently has a result (ie, if converted
        into a L{Deferred}, L{Deferred.addCallback} would cause the added
        callback to be called before C{addCallback} returns),
        L{SynchronousTestCase.successResultOf} returns that result.
        N)r­  rH   r�  rË  r   s    r   r®  zFResultOfCoroutineAssertionsTests.test_successResultOfWithSuccessResultE  s<   € ð 	×Ò˜Tœ[¨$×*>Ò*>¸t×?QÒ?QÑ?SÔ?SÑ*TÔ*TÑUÔUÐUÐUÐUr   c                 ó¼   — |                       | j        j        |                      |                      ¦   «         | j        j        t          ¦  «        j        ¦  «         dS )ar  
        When passed a coroutine which currently has an exception result (ie, if
        converted into a L{Deferred}, L{Deferred.addErrback} would cause the
        added errback to be called before C{addErrback} returns),
        L{SynchronousTestCase.failureResultOf} returns a L{Failure} containing
        that exception, if the exception type is expected.
        N)rF   r‘  Úvaluer˜  rÐ  rÊ   r�  r   s    r   Ú)test_failureResultOfWithExpectedExceptionzJResultOfCoroutineAssertionsTests.test_failureResultOfWithExpectedExceptionN  s\   € ð 	×ÒØŒLÔØ× Ò Ø×$Ò$Ñ&Ô&¨¬Ô(9½8ñô äñ		
ô 	
ð 	
ð 	
ð 	
r   c                 óš   — |                       | j        j        |                      |                      ¦   «         ¦  «        j        ¦  «         dS )aW  
        When passed a coroutine which currently has an exception result (ie, if
        converted into a L{Deferred}, L{Deferred.addErrback} would cause the
        added errback to be called before C{addErrback} returns),
        L{SynchronousTestCase.failureResultOf} returns returns a L{Failure}
        containing that exception.
        N)rF   r‘  rå  r˜  rÐ  r   s    r   Ú!test_failureResultOfWithExceptionzBResultOfCoroutineAssertionsTests.test_failureResultOfWithException]  sM   € ð 	×ÒØŒLÔ × 4Ò 4°T×5IÒ5IÑ5KÔ5KÑ LÔ LÔ Rñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ól   — |                       | j        | j        |                      ¦   «         ¦  «         dS )zÕ
        When passed a coroutine which currently has a success result (see
        L{test_withSuccessResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r¦   rE   r´  rË  r   s    r   rµ  z;ResultOfCoroutineAssertionsTests.test_assertNoResultSuccessi  s?   € ð 	×ÒØÔ! 4Ô#6¸×8JÒ8JÑ8LÔ8Lñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ól   — |                       | j        | j        |                      ¦   «         ¦  «         dS )zØ
        When passed a coroutine which currently has an exception result (see
        L{test_withFailureResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r¦   rE   r´  rÐ  r   s    r   r·  z;ResultOfCoroutineAssertionsTests.test_assertNoResultFailures  s?   € ð 	×ÒØÔ! 4Ô#6¸×8LÒ8LÑ8NÔ8Nñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óT   — |                       |                      ¦   «         ¦  «         dS )zŒ
        When passed a coroutine with no current result,
        L{SynchronousTestCase.assertNoResult} does not raise an exception.
        N)r´  rÍ  r   s    r   r¹  z4ResultOfCoroutineAssertionsTests.test_assertNoResult}  s*   € ð
 	×Ò˜D×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ð3Ð3r   c                 óü   ‡— t          ¦   «         Šˆfd„} |¦   «         }|                      ‰¦  «         ‰                     | j        ¦  «         |                      | j        |                      |¦  «        ¦  «         dS )zï
        When passed a coroutine awaiting a L{Deferred} with no current result,
        which is then fired with a success result,
        L{SynchronousTestCase.assertNoResult} doesn't modify the result of the
        L{Deferred}.
        c               “   ó   •K  — ‰ ƒ d {V —†S r   r$   ©r¾  s   €r   rÍ  z^ResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesSuccess.<locals>.noCurrentResult�  ó   øè è € Ø�7�7�7�7�7�7ˆNr   Nr»  )r   rÍ  Úcr¾  s      @r   r¿  zEResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesSuccess„  sŠ   ø€ õ ‰JŒJˆð	ð 	ð 	ð 	ð 	ð ˆOÑÔˆØ×Ò˜AÑÔÐØ	�
Š
�4”;ÑÔÐØ×Ò˜œ d×&:Ò&:¸1Ñ&=Ô&=Ñ>Ô>Ð>Ð>Ð>r   c                 ó$  ‡— t          | j        ¦  «        }t          ¦   «         Šˆfd„} |¦   «         }|                      ‰¦  «         ‰                     |¦  «         |                      |j        |                      |¦  «        j        ¦  «         dS )zò
        When passed a coroutine awaiting a L{Deferred} with no current result,
        which is then fired with a L{Failure} result,
        L{SynchronousTestCase.assertNoResult} doesn't modify the result of the
        L{Deferred}.
        c               “   ó   •K  — ‰ ƒ d {V —†S r   r$   rî  s   €r   rÍ  zcResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesLaterFailure.<locals>.noCurrentResultŸ  rï  r   N)r
   r§   r   r´  rÁ  rF   rå  r˜  )r   r{  rÍ  rð  r¾  s       @r   rÂ  zJResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesLaterFailure•  s—   ø€ õ �D”NÑ#Ô#ˆÝ‰JŒJˆð	ð 	ð 	ð 	ð 	ð ˆOÑÔˆØ×Ò˜AÑÔÐØ	�	Š	�!‰ŒˆØ×Ò˜œ $×"6Ò"6°qÑ"9Ô"9Ô"?Ñ@Ô@Ð@Ð@Ð@r   c                 óî   ‡— t          | j        ¦  «        Šˆfd„} |¦   «         }	 |                      ‰¦  «         n# | j        $ r Y nw xY w|                      d|                      |¦  «        ¦  «         dS )rÄ  c               “   ó   •K  — ‰ ƒ d {V —†S r   r$   rî  s   €r   rÐ  zeResultOfCoroutineAssertionsTests.test_assertNoResultSwallowsImmediateFailure.<locals>.raisesException¯  rï  r   NrÅ  )r   rÐ  rð  r¾  s      @r   rÆ  zLResultOfCoroutineAssertionsTests.test_assertNoResultSwallowsImmediateFailure§  s¥   ø€ õ �”ÑÔˆð	ð 	ð 	ð 	ð 	ð ˆOÑÔˆð	Ø×Ò Ñ"Ô"Ð"Ð"øØÔ$ð 	ð 	ð 	ØˆDð	øøøà×Ò˜˜t×3Ò3°AÑ6Ô6Ñ7Ô7Ð7Ð7Ð7s   ¦< ¼
A	ÁA	r   ) r   r    r!   r+   rß   rH   rÇ  r§   r
   r‘  rË  rÍ  rÐ  rŽ  rÔ  r–  r™  r›  rž  rÜ  rÞ  rà  râ  r®  ræ  rè  rµ  r·  r¹  r¿  rÂ  rÆ  r$   r   r   rÉ  rÉ  ¤  s§  € € € € € ðð ð ˆV‰XŒX€FØ�	˜+Ñ&Ô&€IØˆg�iÑ Ô €Gðð ð ðð ð ðð ð ð ð

ð 
ð 
ð
ð 
ð 
ðCð Cð Cð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ðð ð ð$Cð Cð Cðð ð ð*Cð Cð Cð&Vð Vð Vð
ð 
ð 
ð

ð 

ð 

ð
ð 
ð 
ð
ð 
ð 
ð4ð 4ð 4ð?ð ?ð ?ð"Að Að Að$8ð 8ð 8ð 8ð 8r   rÉ  c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚAssertionNamesTestszK
    Tests for consistency of naming within TestCase assertion methods
    c                 óF   ‡— i Št          | ‰d¦  «         ˆfd„‰D ¦   «         S )NÚassertc                 óV   •— g | ]%}|                      d ¦  «        °|dk    ¯‰|         ‘Œ&S )ÚNotÚ_)rË   )Ú.0ÚkÚdcts     €r   ú
<listcomp>z3AssertionNamesTests._getAsserts.<locals>.<listcomp>Â  s3   ø€ ÐLÐLÐL˜1¨1¯<ª<¸Ñ+>Ô+>ÐLÀ1ÈÂ8À8��A”À8À8À8r   )r   )r   rþ  s    @r   Ú_getAssertszAssertionNamesTests._getAsserts¿  s4   ø€ ØˆÝ˜$  XÑ.Ô.Ð.ØLÐLÐLÐL ÐLÑLÔLÐLr   c                 ó   — |j         S r   )r   r·   s     r   Ú_namezAssertionNamesTests._nameÄ  s
   € ØŒzÐr   c                 óÔ   — t          |                      ¦   «         ¦  «        }t          t          | d¦  «        ¦  «        }|                      ||                     |¦  «        ¦  «         dS )aµ  
        The C{failUnless*} test methods are a subset of the C{assert*} test
        methods.  This is intended to ensure that methods using the
        I{failUnless} naming scheme are not added without corresponding methods
        using the I{assert} naming scheme.  The I{assert} naming scheme is
        preferred, and new I{assert}-prefixed methods may be added without
        corresponding I{failUnless}-prefixed methods.
        r‚   N)Úsetr   r   rF   Úintersection)r   ÚassertsÚfailUnlessess      r   Útest_failUnlessMatchesAssertz0AssertionNamesTests.test_failUnlessMatchesAssertÇ  s^   € õ �d×&Ò&Ñ(Ô(Ñ)Ô)ˆÝ�?¨4°Ñ>Ô>Ñ?Ô?ˆØ×Ò˜ w×';Ò';¸LÑ'IÔ'IÑJÔJÐJÐJÐJr   c                 óê   — t          t          j        d¦  «        }t          t          j        d¦  «        }|                      t	          || j        ¬¦  «        t	          || j        ¬¦  «        ¦  «         d S )NÚ	assertNotro   )Úkey)r   r   rT   rF   Úsortedr  )r   r  ÚfailIfss      r   Útest_failIf_matches_assertNotz1AssertionNamesTests.test_failIf_matches_assertNotÔ  sk   € Ý!¥(Ô">ÀÑLÔLˆÝ!¥(Ô">ÀÑIÔIˆØ×ÒÝ�7 ¤
Ð+Ñ+Ô+­V°GÀÄÐ-LÑ-LÔ-Lñ	
ô 	
ð 	
ð 	
ð 	
r   c           
      ó:  — t          | ¦  «                             ¦   «         D ]ø\  }}t          |¦  «        sŒ|                     d¦  «        rT|                      t          | |dz   ¦  «        |› d|› d�¦  «         |                      |t          | |dz   ¦  «        ¦  «         |                     d¦  «        re|                      t          | |d d…         ¦  «        |› d|d d…         › �¦  «         |                      |t          | |d d…         ¦  «        ¦  «         Œùd S )NÚEqualÚsz but no ÚEqualséÿÿÿÿ)ÚvarsÚitemsÚcallableÚendswithr~   ÚhasattrrF   r*  )r   r   rå  s      r   Útest_equalSpellingz&AssertionNamesTests.test_equalSpellingÛ  s/  € Ý ™:œ:×+Ò+Ñ-Ô-ð 	Bð 	B‰KˆD�%Ý˜E‘?”?ð ØØ�}Š}˜WÑ%Ô%ð CØ—’¥¨¨d°S©jÑ 9Ô 9¸dÐ;SÐ;SÈDÐ;SÐ;SÐ;SÑTÔTÐTØ× Ò  ­°°d¸S±jÑ(AÔ(AÑBÔBÐBØ�}Š}˜XÑ&Ô&ð BØ—’¥¨¨d°3°B°3¬iÑ 8Ô 8¸TÐ:VÐ:VÈ4ÐPSÐQSÐPSÌ9Ð:VÐ:VÑWÔWÐWØ× Ò  ­°°d¸3¸B¸3´iÑ(@Ô(@ÑAÔAÐAøð	Bð 	Br   N)	r   r    r!   r+   r   r  r  r  r  r$   r   r   rö  rö  º  st   € € € € € ðð ðMð Mð Mð
ð ð ðKð Kð Kð
ð 
ð 
ð	Bð 	Bð 	Bð 	Bð 	Br   rö  c                   óX   — e Zd ZdZ edddd¦  «        Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ ZdS )ÚCallDeprecatedTestsz\
    Test use of the L{SynchronousTestCase.callDeprecated} method with version objects.
    ÚTwistedé   r   c                 óš   — |                       | j        t          d¦  «         |                      |                      ¦   «         g d¦  «         dS )zj
        callDeprecated calls a deprecated callable, suppressing the
        deprecation warning.
        r¤   zNo warnings should be shownN)ÚcallDeprecatedÚversionÚ	oldMethodrF   r†  r   s    r   Ú$test_callDeprecatedSuppressesWarningz8CallDeprecatedTests.test_callDeprecatedSuppressesWarningî  sI   € ð
 	×Ò˜DœL­)°UÑ;Ô;Ð;Ø×Ò˜×+Ò+Ñ-Ô-¨rÐ3PÑQÔQÐQÐQÐQr   c                 ót   — |                       | j        t          d¦  «        }|                      d|¦  «         dS )zn
        L{callDeprecated} actually calls the callable passed to it, and
        forwards the result.
        r¤   N)r  r   r!  rF   rG   s     r   Ú test_callDeprecatedCallsFunctionz4CallDeprecatedTests.test_callDeprecatedCallsFunctionö  s9   € ð
 ×$Ò$ T¤\µ9¸eÑDÔDˆØ×Ò˜ Ñ'Ô'Ð'Ð'Ð'r   c                 ó¦   — d„ }|                       | j        | j        | j        |¦  «        }|                      d|z  t          |¦  «        ¦  «         dS )zd
        L{callDeprecated} raises a test failure if the callable is not
        deprecated.
        c                  ó   — d S r   r$   r$   r   r   ÚnotDeprecatedzGCallDeprecatedTests.test_failsWithoutDeprecation.<locals>.notDeprecated  s   € ØˆDr   z%r is not deprecated.N)r¦   rE   r  r   rF   r#   )r   r'  r§   s      r   Útest_failsWithoutDeprecationz0CallDeprecatedTests.test_failsWithoutDeprecationþ  sc   € ð	ð 	ð 	ð ×%Ò%ØÔ! 4Ô#6¸¼Àmñ
ô 
ˆ	ð 	×ÒÐ0°=Ñ@Å#ÀiÁ.Ä.ÑQÔQÐQÐQÐQr   c                 óD  — t          dddd¦  «        }|                      | j        | j        |t          d¦  «        }|                      t          | j        ¦  «        t          |¦  «        ¦  «         |                      t          |¦  «        t          |¦  «        ¦  «         dS )z‰
        callDeprecated raises a test failure if the callable was deprecated
        at a different version to the one expected.
        ÚFoorK   r`   rb   r¤   N)	r   r¦   rE   r  r!  rj   r   r   r#   )r   ÚdifferentVersionr§   s      r   Ú"test_failsWithIncorrectDeprecationz6CallDeprecatedTests.test_failsWithIncorrectDeprecation  s“   € õ
 # 5¨!¨Q°Ñ2Ô2ÐØ×%Ò%ØÔ!ØÔØÝØñ
ô 
ˆ	ð 	�ŠÕ& t¤|Ñ4Ô4µc¸)±n´nÑEÔEÐEØ�ŠÕ&Ð'7Ñ8Ô8½#¸i¹.¼.ÑIÔIÐIÐIÐIr   c                 ó  — t          dddd¦  «        }d„ } t          |¦  «        |¦  «        }|                      ||d¦  «         |                      ¦   «         }|                      t          |¦  «        dd|› �¦  «         dS )	a:  
        L{callDeprecated} ignores all deprecations apart from the first.

        Multiple warnings are generated when a deprecated function calls
        another deprecated function. The first warning is the one generated by
        the explicitly called function. That's the warning that we care about.
        r*  rK   r`   rb   c                  ó   — t          | Ž S r   )r!  )Úargss    r   ÚnestedDeprecationzECallDeprecatedTests.test_nestedDeprecation.<locals>.nestedDeprecation&  s   € Ý˜dÐ#Ð#r   é   zUnexpected warnings: N)r   r   r  r†  rF   rQ   )r   r+  r0  ÚwarningsShowns       r   Útest_nestedDeprecationz*CallDeprecatedTests.test_nestedDeprecation  sŸ   € õ # 5¨!¨Q°Ñ2Ô2Ðð	$ð 	$ð 	$ð 9�JÐ'7Ñ8Ô8Ð9JÑKÔKÐà×ÒÐ,Ð.?ÀÑDÔDÐDð
 ×*Ò*Ñ,Ô,ˆØ×Ò�˜]Ñ+Ô+¨QÐ0WÈÐ0WÐ0WÑXÔXÐXÐXÐXr   c                 óL   — |                       | j        dft          d¦  «         dS )zj
        L{callDeprecated} can take a message argument used to check the warning
        emitted.
        Ú	newMethodrK   N)r  r   ÚoldMethodReplacedr   s    r   Útest_callDeprecationWithMessagez3CallDeprecatedTests.test_callDeprecationWithMessage3  s*   € ð
 	×Ò˜Tœ\¨;Ð7Õ9JÈAÑNÔNÐNÐNÐNr   c                 ó  — |                       | j        | j        | j        dft          d¦  «        }|                      t          | j        ¦  «        t          |¦  «        ¦  «         |                      dt          |¦  «        ¦  «         dS )z|
        If the message passed to L{callDeprecated} doesn't match,
        L{callDeprecated} raises a test failure.
        zsomething.wrongrK   zplease use newMethod insteadN)r¦   rE   r  r   r6  rj   r   r#   rÏ  s     r   Ú$test_callDeprecationWithWrongMessagez8CallDeprecatedTests.test_callDeprecationWithWrongMessage:  s~   € ð
 ×%Ò%ØÔ!ØÔØŒ\Ð,Ð-ÝØñ
ô 
ˆ	ð 	�ŠÕ& t¤|Ñ4Ô4µc¸)±n´nÑEÔEÐEØ�ŠÐ4µc¸)±n´nÑEÔEÐEÐEÐEr   N)r   r    r!   r+   r   r   r"  r$  r(  r,  r3  r7  r9  r$   r   r   r  r  ç  s²   € € € € € ðð ð ˆg�i  A qÑ)Ô)€GðRð Rð Rð(ð (ð (ðRð Rð RðJð Jð Jð Yð Yð Yð.Oð Oð OðFð Fð Fð Fð Fr   r  c                 ó   — | S )z(
    Deprecated method for testing.
    r$   ©rŽ   s    r   r!  r!  J  s	   € ð
 €Hr   r5  )Úreplacementc                 ó   — d| z  S )zh
    Another deprecated method, which has been deprecated in favor of the
    mythical 'newMethod'.
    r`   r$   r;  s    r   r6  r6  R  s   € ð ˆq‰5€Lr   c                   óF   — e Zd ZdZ edddd¦  «        Zd„ Zd„ Zd„ Zd	„ Z	d
S )Ú!GetDeprecatedModuleAttributeTestszÓ
    Test L{SynchronousTestCase.getDeprecatedModuleAttribute}

    @ivar version: The version at which L{test_assertions.somethingOld}
        is marked deprecated.
    @type version: L{incremental.Version}
    ÚBarrK   r`   rb   c                 óÊ   — |                       t          |                      t          d| j        ¦  «        ¦  «         |                      g |                      ¦   «         ¦  «         dS )zŽ
        L{getDeprecatedModuleAttribute} returns the specified attribute and
        consumes the deprecation warning that generates.
        ÚsomethingOldN©rÅ   Ú_somethingOldÚgetDeprecatedModuleAttributer   r   rF   r†  r   s    r   Útest_deprecatedz1GetDeprecatedModuleAttributeTests.test_deprecatedf  se   € ð
 	�ŠÝØ×-Ò-ÝØØ”ñô ñ	
ô 	
ð 	
ð 	×Ò˜˜T×/Ò/Ñ1Ô1Ñ2Ô2Ð2Ð2Ð2r   c           	      óÎ   — |                       t          |                      t          d| j        d¬¦  «        ¦  «         |                      g |                      ¦   «         ¦  «         dS )zƒ
        The I{message} argument to L{getDeprecatedModuleAttribute} matches the
        prefix of the deprecation message.
        rB  zIt's old)r£   NrC  r   s    r   Útest_messagez.GetDeprecatedModuleAttributeTests.test_messageu  sm   € ð
 	�ŠÝØ×-Ò-ÝØØ”Ø"ð	 .ñ ô ñ	
ô 	
ð 	
ð 	×Ò˜˜T×/Ò/Ñ1Ô1Ñ2Ô2Ð2Ð2Ð2r   c                 ó²   — |                       | j        | j        t          d| j        d¦  «         |                      g |                      ¦   «         ¦  «         dS )zˆ
        L{getDeprecatedModuleAttribute} fails the test if the I{message} isn't
        part of the deprecation message prefix.
        rB  zIt's shiny and newN)r¦   rE   rE  r   r   rF   r†  r   s    r   Útest_messageMismatchz6GetDeprecatedModuleAttributeTests.test_messageMismatch…  s`   € ð
 	×ÒØÔ!ØÔ-ÝØØŒLØ ñ	
ô 	
ð 	
ð 	×Ò˜˜T×/Ò/Ñ1Ô1Ñ2Ô2Ð2Ð2Ð2r   c                 ó`   — |                       | j        | j        t          d| j        ¦  «         dS )z†
        L{getDeprecatedModuleAttribute} fails the test when used to get an
        attribute that isn't actually deprecated.
        ÚsomethingNewN)r¦   rE   rE  r   r   r   s    r   Útest_notDeprecatedz4GetDeprecatedModuleAttributeTests.test_notDeprecated”  s=   € ð
 	×ÒØÔ!ØÔ-ÝØØŒLñ	
ô 	
ð 	
ð 	
ð 	
r   N)
r   r    r!   r+   r   r   rF  rH  rJ  rM  r$   r   r   r?  r?  [  sq   € € € € € ðð ð ˆg�e˜Q  1Ñ%Ô%€Gð3ð 3ð 3ð3ð 3ð 3ð 3ð 3ð 3ð
ð 
ð 
ð 
ð 
r   r?  c                  ó   — dS )zj
    A deprecated module attribute. Used by
    L{GetDeprecatedModuleAttributeTests.test_deprecated}.
    Nr$   r$   r   r   rB  rB  ¢  ó   € € € r   zIt's old and clunkyrB  c                  ó   — dS )zy
    A module attribute that is not deprecated. Used by
    L{GetDeprecatedModuleAttributeTests.test_notDeprecated}.
    Nr$   r$   r   r   rL  rL  µ  rO  r   ),r+   r   r9   r5  Úincrementalr   r   Útwisted.internet.deferr   r   r   Útwisted.python.deprecater   r	   Útwisted.python.failurer
   Útwisted.python.reflectr   r   r   Útwisted.python.utilr   Útwisted.trialr   r&   r’   r/   rT   rV   rx   rŠ   r-  rŠ  rÉ  rö  r  r   r!  r6  r?  rB  rD  r   rL  r$   r   r   ú<module>rX     sú  ðð	ð 	ð Ð Ð Ð Ø €€€à 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1à :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ø JÐ JÐ JÐ JÐ JÐ JÐ JÐ JØ *Ð *Ð *Ð *Ð *Ð *ðð ð ð ð ð ð ð ð ð ð
 -Ð ,Ð ,Ð ,Ð ,Ð ,Ø "Ð "Ð "Ð "Ð "Ð "ð,ð ,ð ,ð ,ð ,�<ñ ,ô ,ð ,ð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð3;ð 3;ð 3;ð 3;ð 3;�v”ñ 3;ô 3;ð 3;ðlJ0ð J0ð J0ð J0ð J0�xÔ3ñ J0ô J0ð J0ðZJ.ð J.ð J.ð J.ð J.�hÔ2ñ J.ô J.ð J.ðZI
ð I
ð I
ð I
ð I
 Ô!=ñ I
ô I
ð I
ðXm4ð m4ð m4ð m4ð m4˜HÔ8ñ m4ô m4ð m4ð`^8ð ^8ð ^8ð ^8ð ^8˜hÔ:ñ ^8ô ^8ð ^8ðBS8ð S8ð S8ð S8ð S8 xÔ'Cñ S8ô S8ð S8ðl*Bð *Bð *Bð *Bð *B˜(Ô6ñ *Bô *Bð *BðZ`Fð `Fð `Fð `Fð `F˜(Ô6ñ `Fô `Fð `FðF €ÐÔ'Ñ(Ô(ðð ñ )Ô(ðð €ÐÔ'°[ÐAÑAÔAðð ñ BÔAððD
ð D
ð D
ð D
ð D
¨Ô(Dñ D
ô D
ð D
ðNð ð ð €ð Ð Ø%Ô-ØØØñ	ô ð ðð ð ð ð r   