§
    Ètºfç¾  ã                   ó¤  — d Z ddlmZmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ej        ZddlmZ  G d„ dej        ¦  «        Z G d	„ d
e¦  «        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¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        ZdS )z%
Tests for L{twisted.internet.task}.
é    )ÚdeferÚerrorÚ
interfacesÚreactorÚtask)ÚinstallReactor)Ú	NoReactor)Úunittest)Úfailurec                   ó   ‡ — e Zd Zˆ fd„Zˆ xZS )ÚTestableLoopingCallc                 óH   •—  t          ¦   «         j        |i |¤Ž || _        d S ©N)ÚsuperÚ__init__Úclock)Úselfr   ÚaÚkwÚ	__class__s       €úU/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/test/test_task.pyr   zTestableLoopingCall.__init__   s*   ø€ Ø�‰ŒÔ˜!Ð"˜rÐ"Ð"Ð"ØˆŒ
ˆ
ˆ
ó    )Ú__name__Ú
__module__Ú__qualname__r   Ú__classcell__)r   s   @r   r   r      s8   ø€ € € € € ðð ð ð ð ð ð ð ð r   r   c                   ó   — e Zd ZdS )ÚTestExceptionN©r   r   r   © r   r   r   r      s   € € € € € Ø€Dr   r   c                   ól   — 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S )Ú
ClockTestsz<
    Test the non-wallclock based clock implementation.
    c                 ó|   — t          j        ¦   «         }|                      |                     ¦   «         d¦  «         dS )zV
        Test that the C{seconds} method of the fake clock returns fake time.
        r   N)r   ÚClockÚassertEqualÚseconds©r   Úcs     r   ÚtestSecondszClockTests.testSeconds#   s3   € õ ŒJ‰LŒLˆØ×Ò˜Ÿš™œ aÑ(Ô(Ð(Ð(Ð(r   c                 ób  — t          j        ¦   «         }|                     dd„ dd¬¦  «        }|                      t          j                             |¦  «        ¦  «         |                      |                     ¦   «         d¦  «         |                      | 	                    ¦   «         ¦  «         dS )z{
        Test that calls can be scheduled for later with the fake clock and
        hands back an L{IDelayedCall}.
        é   c                 ó   — d S r   r    ©r   Úbs     r   ú<lambda>z*ClockTests.testCallLater.<locals>.<lambda>0   ó   € ¨4€ r   é   ©r.   N)
r   r$   Ú	callLaterÚ
assertTruer   ÚIDelayedCallÚ
providedByr%   ÚgetTimeÚactive©r   r(   Úcalls      r   ÚtestCallLaterzClockTests.testCallLater*   s�   € õ
 ŒJ‰LŒLˆØ�{Š{˜1Ð/Ð/°°aˆ{Ñ8Ô8ˆØ�Š�
Ô/×:Ò:¸4Ñ@Ô@ÑAÔAÐAØ×Ò˜Ÿš™œ¨Ñ+Ô+Ð+Ø�Š˜Ÿš™œÑ&Ô&Ð&Ð&Ð&r   c                 óÖ   — t          j        ¦   «         }|                     dd„ dd¬¦  «        }|                     ¦   «          |                      |                     ¦   «         ¦  «         dS )z3
        Test that calls can be cancelled.
        r+   c                 ó   — d S r   r    r-   s     r   r/   z3ClockTests.testCallLaterCancelled.<locals>.<lambda>:   r0   r   r1   r2   N)r   r$   r3   ÚcancelÚassertFalser8   r9   s      r   ÚtestCallLaterCancelledz!ClockTests.testCallLaterCancelled5   s[   € õ ŒJ‰LŒLˆØ�{Š{˜1Ð/Ð/°°aˆ{Ñ8Ô8ˆØ�Š‰ŒˆØ×Ò˜Ÿš™œÑ'Ô'Ð'Ð'Ð'r   c                 óÂ   — t          j        ¦   «         }|                     dd„ dd¬¦  «        }|                     dd„ dd¬¦  «        }|                      ||u ¦  «         d	S )
z[
        Test that the DelayedCall returned is not one previously
        created.
        é
   c                 ó   — d S r   r    r-   s     r   r/   z3ClockTests.test_callLaterOrdering.<locals>.<lambda>D   s   € ¨T€ r   r+   r1   r2   c                 ó   — d S r   r    r-   s     r   r/   z3ClockTests.test_callLaterOrdering.<locals>.<lambda>E   s   € ¨D€ r   é   é   N)r   r$   r3   r?   )r   r(   Úcall1Úcall2s       r   Útest_callLaterOrderingz!ClockTests.test_callLaterOrdering>   sg   € õ
 ŒJ‰LŒLˆØ—’˜BÐ 1Ð 1°1¸�Ñ:Ô:ˆØ—’˜AÐ0Ð0°!°q�Ñ9Ô9ˆØ×Ò˜ %˜Ñ(Ô(Ð(Ð(Ð(r   c                 ó`  ‡— g Št          j        ¦   «         }|                     dˆfd„¦  «        }|                     d¦  «         |                      ‰g ¦  «         |                     d¦  «         |                      ‰dg¦  «         |                      |                     ¦   «         ¦  «         dS )zE
        Test that advancing the clock will fire some calls.
        r1   c                  ó.   •— ‰                       d ¦  «        S r   ©Úappend)Úeventss   €r   r/   z(ClockTests.testAdvance.<locals>.<lambda>N   s   ø€  f§m¢m°DÑ&9Ô&9€ r   r+   N)r   r$   r3   Úadvancer%   r?   r8   ©r   r(   r:   rN   s      @r   ÚtestAdvancezClockTests.testAdvanceH   s    ø€ ð ˆÝŒJ‰LŒLˆØ�{Š{˜1Ð9Ð9Ð9Ð9Ñ:Ô:ˆØ	�	Š	�!‰ŒˆØ×Ò˜ Ñ$Ô$Ð$Ø	�	Š	�!‰ŒˆØ×Ò˜ $ Ñ(Ô(Ð(Ø×Ò˜Ÿš™œÑ'Ô'Ð'Ð'Ð'r   c                 ó’   ‡ ‡— t          j        ¦   «         }ˆˆ fd„}|                     d|¦  «        Š|                     d¦  «         dS )a  
        Test attempting to cancel the call in a callback.

        AlreadyCalled should be raised, not for example a ValueError from
        removing the call from Clock.calls. This requires call.called to be
        set before the callback is called.
        c                  óR   •— ‰                      t          j        ‰ j        ¦  «         d S r   )ÚassertRaisesr   ÚAlreadyCalledr>   )r:   r   s   €€r   Úcbz(ClockTests.testAdvanceCancel.<locals>.cb_   s$   ø€ Ø×Ò�eÔ1°4´;Ñ?Ô?Ð?Ð?Ð?r   r+   N)r   r$   r3   rO   )r   r(   rV   r:   s   `  @r   ÚtestAdvanceCancelzClockTests.testAdvanceCancelU   s]   øø€ õ ŒJ‰LŒLˆð	@ð 	@ð 	@ð 	@ð 	@ð 	@ð �{Š{˜1˜bÑ!Ô!ˆØ	�	Š	�!‰Œˆˆˆr   c                 ó’  ‡— g Št          j        ¦   «         }|                     dˆfd„dd¬¦  «        }|                     d¦  «         |                      |                     ¦   «         d¦  «         |                     d¦  «         |                      ‰g ¦  «         |                     d¦  «         |                      ‰dg¦  «         dS )	z1
        Test that calls can be delayed.
        r+   c                 ó2   •— ‰                      | |f¦  «        S r   rL   ©r   r.   rN   s     €r   r/   z1ClockTests.testCallLaterDelayed.<locals>.<lambda>k   ó   ø€ ¨6¯=ª=¸!¸Q¸Ñ+@Ô+@€ r   r1   r2   g      ø?ç      ð?©r+   r1   N)r   r$   r3   Údelayr%   r7   rO   rP   s      @r   ÚtestCallLaterDelayedzClockTests.testCallLaterDelayede   s·   ø€ ð ˆÝŒJ‰LŒLˆØ�{Š{˜1Ð@Ð@Ð@Ð@À!Àqˆ{ÑIÔIˆØ�
Š
�1‰ŒˆØ×Ò˜Ÿš™œ¨Ñ+Ô+Ð+Ø	�	Š	�#‰ŒˆØ×Ò˜ Ñ$Ô$Ð$Ø	�	Š	�#‰ŒˆØ×Ò˜ & Ñ*Ô*Ð*Ð*Ð*r   c                 ó¼  ‡— g Št          j        ¦   «         }|                     dˆfd„dd¬¦  «        }|                     d¦  «         |                     d¦  «         |                      |                     ¦   «         d¦  «         |                     d¦  «         |                      ‰g ¦  «         |                     d¦  «         |                      ‰dg¦  «         dS )	zL
        Test that calls can have their time reset to a later time.
        r1   c                 ó2   •— ‰                      | |f¦  «        S r   rL   rZ   s     €r   r/   z4ClockTests.testCallLaterResetLater.<locals>.<lambda>y   r[   r   r+   r2   rE   rF   r]   N)r   r$   r3   rO   Úresetr%   r7   rP   s      @r   ÚtestCallLaterResetLaterz"ClockTests.testCallLaterResetLaters   sÆ   ø€ ð ˆÝŒJ‰LŒLˆØ�{Š{˜1Ð@Ð@Ð@Ð@À!Àqˆ{ÑIÔIˆØ	�	Š	�!‰ŒˆØ�
Š
�1‰ŒˆØ×Ò˜Ÿš™œ¨Ñ+Ô+Ð+Ø	�	Š	�!‰ŒˆØ×Ò˜ Ñ$Ô$Ð$Ø	�	Š	�!‰ŒˆØ×Ò˜ & Ñ*Ô*Ð*Ð*Ð*r   c                 ó<  ‡— g Št          j        ¦   «         }|                     dˆfd„dd¬¦  «        }|                     d¦  «         |                      |                     ¦   «         d¦  «         |                     d¦  «         |                      ‰dg¦  «         dS )	zO
        Test that calls can have their time reset to an earlier time.
        rF   c                 ó2   •— ‰                      | |f¦  «        S r   rL   rZ   s     €r   r/   z5ClockTests.testCallLaterResetSooner.<locals>.<lambda>ˆ   r[   r   r+   r1   r2   rE   r]   N)r   r$   r3   rb   r%   r7   rO   rP   s      @r   ÚtestCallLaterResetSoonerz#ClockTests.testCallLaterResetSooner‚   s’   ø€ ð ˆÝŒJ‰LŒLˆØ�{Š{˜1Ð@Ð@Ð@Ð@À!Àqˆ{ÑIÔIˆØ�
Š
�1‰ŒˆØ×Ò˜Ÿš™œ¨Ñ+Ô+Ð+Ø	�	Š	�!‰ŒˆØ×Ò˜ & Ñ*Ô*Ð*Ð*Ð*r   c                 óú   — t          j        ¦   «         }|                     dd„ ¦  «        }|                     dd„ ¦  «        }|                     ¦   «         }|                      ||ht          |¦  «        ¦  «         dS )zB
        Test that we can get a list of all delayed calls
        r+   c                 ó   — d S r   r    ©Úxs    r   r/   z1ClockTests.test_getDelayedCalls.<locals>.<lambda>“   ó   € ¨€ r   r1   c                 ó   — d S r   r    ri   s    r   r/   z1ClockTests.test_getDelayedCalls.<locals>.<lambda>”   s   € ¨€ r   N)r   r$   r3   ÚgetDelayedCallsr%   Úset)r   r(   r:   rH   Úcallss        r   Útest_getDelayedCallszClockTests.test_getDelayedCallsŽ   sp   € õ ŒJ‰LŒLˆØ�{Š{˜1˜n˜nÑ-Ô-ˆØ—’˜A˜~˜~Ñ.Ô.ˆà×!Ò!Ñ#Ô#ˆà×Ò˜$ ˜­¨E©
¬
Ñ3Ô3Ð3Ð3Ð3r   c                 ó|   — t          j        ¦   «         }|                      |                     ¦   «         g ¦  «         dS )zk
        Test that we get an empty list from getDelayedCalls on a newly
        constructed Clock.
        N)r   r$   r%   rm   r'   s     r   Útest_getDelayedCallsEmptyz$ClockTests.test_getDelayedCallsEmptyš   s7   € õ
 ŒJ‰LŒLˆØ×Ò˜×*Ò*Ñ,Ô,¨bÑ1Ô1Ð1Ð1Ð1r   c                 ó’   — t          j        ¦   «         }|                      t          j                             |¦  «        d¦  «         d S )Nz#Clock does not provide IReactorTime)r   r$   r4   r   ÚIReactorTimer6   r'   s     r   Útest_providesIReactorTimez$ClockTests.test_providesIReactorTime¢   sD   € ÝŒJ‰LŒLˆØ�ŠÝÔ#×.Ò.¨qÑ1Ô1Ð3Xñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó,  ‡‡— g Šddg}t          j        ¦   «         Šˆˆfd„}‰                     d|d¦  «        }|                     d¦  «         ‰                     d|d¦  «         ‰                     d	gd
z  ¦  «         |                      ‰|¦  «         dS )a4  
        The order of calls scheduled by L{task.Clock.callLater} is honored when
        adding a new call via calling L{task.Clock.callLater} again.

        For example, if L{task.Clock.callLater} is invoked with a callable "A"
        and a time t0, and then the L{IDelayedCall} which results from that is
        C{reset} to a later time t2 which is greater than t0, and I{then}
        L{task.Clock.callLater} is invoked again with a callable "B", and time
        t1 which is less than t2 but greater than t0, "B" will be invoked before
        "A".
        ©r.   ç       @©r   ç      @c                 óV   •— ‰                      | ‰                     ¦   «         f¦  «        S r   ©rM   r&   ©Únr   Úresults    €€r   r/   z<ClockTests.test_callLaterKeepsCallsOrdered.<locals>.<lambda>·   ó    ø€ ˜FŸMšM¨1¨e¯mªm©o¬oÐ*>Ñ?Ô?€ r   r\   r   rz   rx   r.   r+   rE   N©r   r$   r3   rb   Úpumpr%   ©r   ÚexpectedÚlogtimeÚcall_ar   r   s       @@r   Útest_callLaterKeepsCallsOrderedz*ClockTests.test_callLaterKeepsCallsOrdered¨   s¢   øø€ ð ˆØ 
Ð+ˆÝ”
‘”ˆØ?Ð?Ð?Ð?Ð?ˆà—’  g¨sÑ3Ô3ˆØ�Š�SÑÔÐØ�Š˜˜W cÑ*Ô*Ð*à�
Š
�A�3˜‘7ÑÔÐØ×Ò˜ Ñ*Ô*Ð*Ð*Ð*r   c                 ó,  ‡‡— g Šddg}t          j        ¦   «         Šˆˆfd„}‰                     d|d¦  «        }‰                     d|d¦  «         |                     d¦  «         ‰                     d	gd
z  ¦  «         |                      ‰|¦  «         dS )a:  
        The order of calls scheduled by L{task.Clock.callLater} is honored when
        re-scheduling an existing call via L{IDelayedCall.reset} on the result
        of a previous call to C{callLater}.

        For example, if L{task.Clock.callLater} is invoked with a callable "A"
        and a time t0, and then L{task.Clock.callLater} is invoked again with a
        callable "B", and time t1 greater than t0, and finally the
        L{IDelayedCall} for "A" is C{reset} to a later time, t2, which is
        greater than t1, "B" will be invoked before "A".
        rw   ry   c                 óV   •— ‰                      | ‰                     ¦   «         f¦  «        S r   r|   r}   s    €€r   r/   zAClockTests.test_callLaterResetKeepsCallsOrdered.<locals>.<lambda>Ï   r€   r   r\   r   rx   r.   rz   r+   rE   Nr�   rƒ   s       @@r   Ú$test_callLaterResetKeepsCallsOrderedz/ClockTests.test_callLaterResetKeepsCallsOrderedÀ   s¢   øø€ ð ˆØ 
Ð+ˆÝ”
‘”ˆØ?Ð?Ð?Ð?Ð?ˆà—’  g¨sÑ3Ô3ˆØ�Š˜˜W cÑ*Ô*Ð*Ø�Š�SÑÔÐà�
Š
�A�3˜‘7ÑÔÐØ×Ò˜ Ñ*Ô*Ð*Ð*Ð*r   c                 ó:  ‡‡‡— g Šddg}t          j        ¦   «         Šˆˆfd„}‰                     d|d¦  «        Šˆfd„}‰                     d|¦  «         ‰                     d|d	¦  «         ‰                     d
gdz  ¦  «         |                      ‰|¦  «         dS )a9  
        The order of calls scheduled by L{task.Clock.callLater} is honored when
        re-scheduling an existing call via L{IDelayedCall.reset} on the result
        of a previous call to C{callLater}, even when that call to C{reset}
        occurs within the callable scheduled by C{callLater} itself.
        )r(   rz   )r.   g      @c                 óV   •— ‰                      | ‰                     ¦   «         f¦  «        S r   r|   r}   s    €€r   r/   zKClockTests.test_callLaterResetInsideCallKeepsCallsOrdered.<locals>.<lambda>â   r€   r   rx   r.   c                  ó2   •— ‰                       d¦  «         d S )Nrz   )rb   )Úcall_bs   €r   r   zDClockTests.test_callLaterResetInsideCallKeepsCallsOrdered.<locals>.aæ   s   ø€ Ø�LŠL˜ÑÔÐÐÐr   r\   rz   r(   ç      à?rB   N)r   r$   r3   r‚   r%   )r   r„   r…   r   rŽ   r   r   s       @@@r   Ú.test_callLaterResetInsideCallKeepsCallsOrderedz9ClockTests.test_callLaterResetInsideCallKeepsCallsOrderedØ   sÀ   øøø€ ð ˆØ 
Ð+ˆÝ”
‘”ˆØ?Ð?Ð?Ð?Ð?ˆà—’  g¨sÑ3Ô3ˆð	ð 	ð 	ð 	ð 	ð 	�Š˜˜QÑÔÐØ�Š˜˜W cÑ*Ô*Ð*à�
Š
�C�5˜2‘:ÑÔÐØ×Ò˜ Ñ*Ô*Ð*Ð*Ð*r   N)r   r   r   Ú__doc__r)   r;   r@   rI   rQ   rW   r_   rc   rf   rp   rr   ru   r‡   rŠ   r�   r    r   r   r"   r"      sÿ   € € € € € ðð ð)ð )ð )ð	'ð 	'ð 	'ð(ð (ð (ð)ð )ð )ð(ð (ð (ðð ð ð +ð +ð +ð+ð +ð +ð
+ð 
+ð 
+ð
4ð 
4ð 
4ð2ð 2ð 2ð
ð 
ð 
ð+ð +ð +ð0+ð +ð +ð0+ð +ð +ð +ð +r   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„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú	LoopTestsz[
    Tests for L{task.LoopingCall} based on a fake L{IReactorTime}
    implementation.
    c                 óp   — t          j        d„ ¦  «        }|                      |j        t          ¦  «         dS )zG
        L{LoopingCall}'s default clock should be the reactor.
        c                  ó   — d S r   r    r    r   r   r/   z-LoopTests.test_defaultClock.<locals>.<lambda>ú   rk   r   N)r   ÚLoopingCallr%   r   r   )r   r:   s     r   Útest_defaultClockzLoopTests.test_defaultClockö   s4   € õ Ô  Ñ-Ô-ˆØ×Ò˜œ¥WÑ-Ô-Ð-Ð-Ð-r   c                 ó8  ‡‡‡— g ŠdŠt          j        ¦   «         Šˆˆˆfd„}t          j        |¦  «        }‰|_        dŠ|                     d¦  «         |                      ‰dg¦  «         |                      ‰                     ¦   «         ‰¦  «         ‰                     d¦  «         |                      ‰dg¦  «         dŠ‰                     d¦  «         |                      ‰ddg¦  «         |                      ‰                     ¦   «         d¦  «         ‰                     d¦  «         |                      ‰ddg¦  «         dŠ‰                     d¦  «         |                      ‰g d	¢¦  «         |                      ‰                     ¦   «         d
¦  «         dS )zÖ
        When more time than the defined interval passes during the execution
        of a callback, L{LoopingCall} should schedule the next call for the
        next interval which is still in the future.
        Nc                  ó€   •— ‰                      ‰                     ¦   «         ¦  «         ‰                     ‰ ¦  «         d S r   )rM   r&   rO   )ÚcallDurationr   Útimess   €€€r   Ú	aCallbackz3LoopTests.test_callbackTimeSkips.<locals>.aCallback  s5   ø€ Ø�LŠL˜Ÿš™œÑ)Ô)Ð)Ø�MŠM˜,Ñ'Ô'Ð'Ð'Ð'r   r1   r�   r   r+   ç      @g      @)r   r�   rF   rF   )r   r$   r–   r   Ústartr%   r&   rO   )r   rœ   r:   rš   r   r›   s      @@@r   Útest_callbackTimeSkipsz LoopTests.test_callbackTimeSkipsý   sª  øøø€ ð ˆØˆÝ”
‘”ˆð	(ð 	(ð 	(ð 	(ð 	(ð 	(ð 	(õ Ô 	Ñ*Ô*ˆØˆŒ
ð ˆØ�
Š
�3‰Œˆð 	×Ò˜  Ñ$Ô$Ð$ð 	×Ò˜Ÿš™œ¨,Ñ7Ô7Ð7ð
 	�Š�aÑÔÐØ×Ò˜  Ñ$Ô$Ð$ð ˆØ�Š�cÑÔÐØ×Ò˜  C Ñ)Ô)Ð)Ø×Ò˜Ÿš™œ¨#Ñ.Ô.Ð.ð 	�Š�aÑÔÐØ×Ò˜  C Ñ)Ô)Ð)ð ˆØ�Š�cÑÔÐØ×Ò˜   Ñ,Ô,Ð,Ø×Ò˜Ÿš™œ¨!Ñ,Ô,Ð,Ð,Ð,r   c                 óÜ  ‡‡— g Št          j        ¦   «         Šˆˆfd„}t          j        |¦  «        }‰|_        |                     d¦  «         |                      ‰dg¦  «         ‰                     d¦  «         |                      ‰ddg¦  «         ‰                     d¦  «         |                      ‰g d¢¦  «         ‰                     d¦  «         |                      ‰g d¢¦  «         dS )a	  
        When more time than the defined interval passes between when
        L{LoopingCall} schedules itself to run again and when it actually
        runs again, it should schedule the next call for the next interval
        which is still in the future.
        c                  óV   •— ‰                      ‰                      ¦   «         ¦  «         d S r   r|   )r   r›   s   €€r   rœ   z2LoopTests.test_reactorTimeSkips.<locals>.aCallback;  s#   ø€ Ø�LŠL˜Ÿš™œÑ)Ô)Ð)Ð)Ð)r   r�   r   r1   r+   )r   r1   rE   N)r   r$   r–   r   rž   r%   rO   )r   rœ   r:   r   r›   s      @@r   Útest_reactorTimeSkipszLoopTests.test_reactorTimeSkips1  s  øø€ ð ˆÝ”
‘”ˆð	*ð 	*ð 	*ð 	*ð 	*ð 	*õ
 Ô 	Ñ*Ô*ˆØˆŒ
Ø�
Š
�3‰Œˆð 	×Ò˜  Ñ$Ô$Ð$ð 	�Š�aÑÔÐØ×Ò˜  A Ñ'Ô'Ð'ð 	�Š�aÑÔÐØ×Ò˜ 	 	 	Ñ*Ô*Ð*ð 	�Š�aÑÔÐØ×Ò˜ 	 	 	Ñ*Ô*Ð*Ð*Ð*r   c                 óZ  ‡‡— g Št          j        ¦   «         Šˆˆfd„}t           j                             |¦  «        }‰|_        d}d}|                     |¦  «         |                      ‰dg¦  «         ‰                     ||z   ¦  «         |                      ‰d||z   dfg¦  «         ‰                     d|z  |z   ¦  «         |                      ‰d||z   dfd|z  d|z  z   dfg¦  «         ‰                     d	¦  «         |                      ‰d||z   dfd|z  d|z  z   dfg¦  «         d
S )a¬  
        When L{LoopingCall} schedules itself to run again, if more than the
        specified interval has passed, it should schedule the next call for the
        next interval which is still in the future. If it was created
        using L{LoopingCall.withCount}, a positional argument will be
        inserted at the beginning of the argument list, indicating the number
        of calls that should have been made.
        c                 óZ   •— ‰                      ‰                     ¦   «         | f¦  «         d S r   r|   )ÚnumCallsr   r›   s    €€r   rœ   z7LoopTests.test_reactorTimeCountSkips.<locals>.aCallback_  s(   ø€ Ø�LŠL˜%Ÿ-š-™/œ/¨8Ð4Ñ5Ô5Ð5Ð5Ð5r   r�   ç{®Gáz„?©r   r+   r+   rE   rF   r1   r   N)r   r$   r–   Ú	withCountr   rž   r%   rO   ©r   rœ   r:   ÚINTERVALÚREALISTIC_DELAYr   r›   s        @@r   Útest_reactorTimeCountSkipsz$LoopTests.test_reactorTimeCountSkipsS  sŽ  øø€ ð ˆÝ”
‘”ˆð	6ð 	6ð 	6ð 	6ð 	6ð 	6õ
 Ô×)Ò)¨)Ñ4Ô4ˆØˆŒ
ØˆØˆØ�
Š
�8ÑÔÐð 	×Ò˜  Ñ)Ô)Ð)ð
 	�Š�h Ñ0Ñ1Ô1Ð1Ø×Ò˜ ¨(°_Ñ*DÀaÐ)HÐ IÑJÔJÐJð 	�Š�q˜8‘| Ñ6Ñ7Ô7Ð7Ø×ÒØàØ˜OÑ+¨QÐ/Ø�h‘, 1 Ñ#6Ñ7¸Ð;ðñ	
ô 	
ð 	
ð 	�Š�aÑÔÐØ×ÒØàØ˜OÑ+¨QÐ/Ø�h‘, 1 Ñ#6Ñ7¸Ð;ðñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó¸  ‡‡— g Št          j        ¦   «         Šˆˆfd„}t           j                             |¦  «        }‰|_        d}d}|                     |¦  «         |                      ‰                     ¦   «         d¦  «         ‰                     ||z   ¦  «         |                      ‰                     ¦   «         ||z   df¦  «         ‰                     |dz  ¦  «         |                      ‰                     ¦   «         d|z  |z   df¦  «         ‰                     |dz  ¦  «         |                      ‰                     ¦   «         d	|z  |z   df¦  «         d
S )a1  
        L{LoopingCall.withCount} counts only calls that were expected to be
        made.  So, if more than one, but less than two intervals pass between
        invocations, it won't increase the count above 1.  For example, a
        L{LoopingCall} with interval T expects to be invoked at T, 2T, 3T, etc.
        However, the reactor takes some time to get around to calling it, so in
        practice it will be called at T+something, 2T+something, 3T+something;
        and due to other things going on in the reactor, "something" is
        variable.  It won't increase the count unless "something" is greater
        than T.  So if the L{LoopingCall} is invoked at T, 2.75T, and 3T,
        the count has not increased, even though the distance between
        invocation 1 and invocation 2 is 1.75T.
        c                 óZ   •— ‰                      ‰                     ¦   «         | f¦  «         d S r   r|   )Úcountr   r›   s    €€r   rœ   z<LoopTests.test_countLengthyIntervalCounts.<locals>.aCallbackž  s(   ø€ Ø�LŠL˜%Ÿ-š-™/œ/¨5Ð1Ñ2Ô2Ð2Ð2Ð2r   r�   r¦   r§   r+   g      ü?g      @g      Ð?rz   N)	r   r$   r–   r¨   r   rž   r%   ÚpoprO   r©   s        @@r   Útest_countLengthyIntervalCountsz)LoopTests.test_countLengthyIntervalCounts�  s\  øø€ ð ˆÝ”
‘”ˆð	3ð 	3ð 	3ð 	3ð 	3ð 	3õ
 Ô×)Ò)¨)Ñ4Ô4ˆØˆŒ
ØˆØˆØ�
Š
�8ÑÔÐØ×Ò˜Ÿš™œ fÑ-Ô-Ð-ð 	�Š�h Ñ0Ñ1Ô1Ð1Ø×Ò˜Ÿš™œ x°/Ñ'AÀ1Ð&EÑFÔFÐFð 	�Š�h ‘oÑ&Ô&Ð&Ø×Ò˜Ÿš™œ¨¨x©¸?Ñ'JÈAÐ&NÑOÔOÐOð 	�Š�h ‘oÑ&Ô&Ð&Ø×Ò˜Ÿš™œ¨¨h©¸/Ñ'IÈ1Ð&MÑNÔNÐNÐNÐNr   c                 óŒ  — t          j        ¦   «         }g }t           j                             |j        ¦  «        }||_        d}d}||z  }|                     |d¬¦  «         t          |¦  «        D ]}|                     |¦  «         Œd„ }| ||g|z  ¦  «        z
  }	|                     |	¦  «         | 	                    ¦   «         }
|  
                    t          |	¦  «        dk    |	› d�¦  «         |  
                    |
|k    |
› d|› �¦  «         |                       ||¦  «        |¦  «         |                      d	|¦  «         d
S )a�  
        L{task.LoopingCall.withCount} should never invoke its callable with a
        zero.  Specifically, if a L{task.LoopingCall} created with C{withCount}
        has its L{start <task.LoopingCall.start>} method invoked with a
        floating-point number which introduces decimal inaccuracy when
        multiplied or divided, such as "0.1", L{task.LoopingCall} will never
        invoke its callable with 0.  Also, the sum of all the values passed to
        its callable as the "count" will be an integer, the number of intervals
        that have elapsed.

        This is a regression test for a particularly tricky case to implement.
        rB   r\   F©Únowc                 ó   — d}| D ]}||z  }Œ|S )zì
            Make sure the result is more precise.
            On Python 3.11 or older this can be a float with ~ 0.00001
            in precision difference.
            See: https://github.com/python/cpython/issues/100425
            ç        r    )ÚitemsÚtotalÚitems      r   Ú
sum_compatzALoopTests.test_withCountFloatingPointBoundary.<locals>.sum_compatÖ  s(   € ð ˆEØð ð �Ø˜‘��ØˆLr   r¶   z should be greater than zeroz$ should be greater than or equal to r   N)r   r$   r–   r¨   rM   r   rž   ÚrangerO   r&   r4   Úabsr%   ÚassertNotIn)r   r   Úaccumulatorr:   r¯   ÚtimespanÚintervalrj   rº   ÚepsilonÚsecondsValues              r   Ú#test_withCountFloatingPointBoundaryz-LoopTests.test_withCountFloatingPointBoundary¶  sp  € õ ”
‘”ˆØˆÝÔ×)Ò)¨+Ô*<Ñ=Ô=ˆØˆŒ
ð
 ˆð ˆà˜eÑ#ˆà�
Š
�8 ˆ
Ñ'Ô'Ð'Ý�u‘”ð 	$ð 	$ˆAØ�MŠM˜(Ñ#Ô#Ð#Ð#ð
	ð 
	ð 
	ð ˜Z˜Z¨¨
°UÑ(:Ñ;Ô;Ñ;ˆØ�Š�gÑÔÐØ—}’}‘”ˆð 	�Š�˜G™œ sÒ*¨wÐ,TÐ,TÐ,TÑUÔUÐUð 	�ŠØ˜HÒ$ØÐKÐKÀÐKÐKñ	
ô 	
ð 	
ð
 	×Ò˜˜ KÑ0Ô0°%Ñ8Ô8Ð8Ø×Ò˜˜KÑ(Ô(Ð(Ð(Ð(r   c                 óJ  ‡‡— t          j        ¦   «         }g Šˆˆfd„}t           j                             |¦  «        Š|‰_        ‰                     dd¬¦  «        }|                     dgdz  ¦  «         |                      |¦  «         |                      dgdz  ‰¦  «         dS )zy
        L{task.LoopingCall.withCount} with interval set to 0 calls the
        countCallable with a count of 1.
        c                 ó„   •— ‰                      | ¦  «         t          ‰¦  «        dk    r‰                     ¦   «          d S d S )NrF   ©rM   ÚlenÚstop)Úcntr¾   Úloops    €€r   Úfooz1LoopTests.test_withCountIntervalZero.<locals>.foo   sC   ø€ Ø×Ò˜sÑ#Ô#Ð#Ý�;ÑÔ !Ò#Ð#Ø—	’	‘”���ð $Ð#r   r   Fr³   é   r+   N)	r   r$   r–   r¨   r   rž   r‚   ÚsuccessResultOfr%   )r   r   rË   Údeferredr¾   rÊ   s       @@r   Útest_withCountIntervalZeroz$LoopTests.test_withCountIntervalZeroø  s¸   øø€ õ
 ”
‘”ˆØˆð	ð 	ð 	ð 	ð 	ð 	õ
 Ô×)Ò)¨#Ñ.Ô.ˆØˆŒ
Ø—:’:˜a U�:Ñ+Ô+ˆð 	�
Š
�A�3˜‘7ÑÔÐØ×Ò˜XÑ&Ô&Ð&à×Ò˜!˜˜q™ +Ñ.Ô.Ð.Ð.Ð.r   c                 ó@  ‡‡‡— t          j        ¦   «         }t          j        ¦   «         Šg Šˆˆˆfd„}t           j                             |¦  «        Š|‰_        ‰                     dd¬¦  «         |                     dgdz  ¦  «         |  	                    dgdz  ‰¦  «         |                     dgdz  ¦  «         |  	                    dgdz  ‰¦  «         ‰ 
                    d¦  «         |                     dgdz  ¦  «         |  	                    dgd	z  ‰¦  «         dS )
zº
        L{task.LoopingCall.withCount} with interval set to 0 and a delayed
        call during the loop run will still call the countCallable 1 as if
        no delay occurred.
        c                 ó®   •— ‰                      | ¦  «         t          ‰¦  «        dk    r‰S t          ‰¦  «        dk    r‰                     ¦   «          d S d S )Nr1   rF   rÆ   )rÉ   r¾   rÎ   rÊ   s    €€€r   rË   z6LoopTests.test_withCountIntervalZeroDelay.<locals>.foo  s[   ø€ Ø×Ò˜sÑ#Ô#Ð#å�;ÑÔ 1Ò$Ð$Ø�å�;ÑÔ !Ò#Ð#Ø—	’	‘”���ð $Ð#r   r   Fr³   r1   r+   NrF   rÌ   )r   r$   r   ÚDeferredr–   r¨   r   rž   r‚   r%   Úcallback)r   r   rË   r¾   rÎ   rÊ   s      @@@r   Útest_withCountIntervalZeroDelayz)LoopTests.test_withCountIntervalZeroDelay  s6  øøø€ õ ”
‘”ˆÝ”>Ñ#Ô#ˆØˆð	ð 	ð 	ð 	ð 	ð 	ð 	õ Ô×)Ò)¨#Ñ.Ô.ˆØˆŒ
Ø�
Š
�1˜%ˆ
Ñ Ô Ð à�
Š
�A�3˜‘7ÑÔÐà×Ò˜!˜˜q™ +Ñ.Ô.Ð.ð 	�
Š
�A�3˜‘7ÑÔÐØ×Ò˜!˜˜q™ +Ñ.Ô.Ð.ð 	×Ò˜$ÑÔÐØ�
Š
�A�3˜‘7ÑÔÐØ×Ò˜!˜˜q™ +Ñ.Ô.Ð.Ð.Ð.r   c                 óÜ  ‡	‡
‡— t          j        ¦   «         }t          j        ¦   «         Š
g Š	dŠd}d}d}||z   }||z  }|dz  }ˆ	ˆ
ˆfd„}t           j                             |¦  «        }||_        |                     dd¬¦  «         |                     dg‰|z   z  ¦  «         |  	                    dg‰z  ‰	¦  «         ||_
        ‰
                     d	¦  «         |                     |¦  «         |  	                    dd|g‰	¦  «         |                     d|z  ¦  «         |  	                    dd|dg‰	¦  «         |                     d|z  ¦  «         |  	                    dd|ddg‰	¦  «         d	S )
z—
        L{task.LoopingCall.withCount} with interval set to 0 will still keep
        the time when last called so when the interval is reset.
        r1   rÌ   é	   r+   c                 ó\   •— ‰                      | ¦  «         t          ‰¦  «        ‰k    r‰S d S r   ©rM   rÇ   )rÉ   r¾   rÎ   ÚstepsBeforeDelays    €€€r   rË   zILoopTests.test_withCountIntervalZeroDelayThenNonZeroInterval.<locals>.foob  s8   ø€ Ø×Ò˜sÑ#Ô#Ð#Ý�;ÑÔÐ#3Ò3Ð3Ø�ð 4Ð3r   r   Fr³   N)r   r$   r   rÒ   r–   r¨   r   rž   r‚   r%   rÀ   rÓ   rO   )r   r   ÚextraTimeAfterDelayÚmutatedLoopIntervalÚdurationOfDelayÚskippedTimeÚexpectedSkipCountrË   rÊ   r¾   rÎ   rÙ   s            @@@r   Ú2test_withCountIntervalZeroDelayThenNonZeroIntervalz<LoopTests.test_withCountIntervalZeroDelayThenNonZeroInterval8  sÇ  øøø€ õ
 ”
‘”ˆÝ”>Ñ#Ô#ˆØˆð Ðð
  Ðð  Ðð ˆð
 *¨OÑ;ˆð (Ð+>Ñ>Ðð 	˜QÑÐð	 ð 	 ð 	 ð 	 ð 	 ð 	 ð 	 õ
 Ô×)Ò)¨#Ñ.Ô.ˆØˆŒ
Ø�
Š
�1˜%ˆ
Ñ Ô Ð ð 	�
Š
�A�3Ð*Ð-@Ñ@ÑAÑBÔBÐBØ×Ò˜!˜Ð/Ñ/°Ñ=Ô=Ð=ð ,ˆŒØ×Ò˜$ÑÔÐà�Š�oÑ&Ô&Ð&à×Ò˜!˜QÐ 1Ð2°KÑ@Ô@Ð@à�Š�aÐ-Ñ-Ñ.Ô.Ð.Ø×Ò˜!˜QÐ 1°1Ð5°{ÑCÔCÐCà�Š�aÐ-Ñ-Ñ.Ô.Ð.Ø×Ò˜!˜QÐ 1°1°aÐ8¸+ÑFÔFÐFÐFÐFr   c                 ó¼  ‡‡— g d¢}t          j        ¦   «         }g Šdˆfd„	}t          ||ddd¬¦  «        }|                     d¦  «        }g Šˆfd„}|                     |¦  «         |                     |¦  «         |                      t          ‰¦  «        d	d
t          ‰¦  «        fz  ¦  «         ‰D ]^\  }}}	}
|                      |d¦  «         |                      |d¦  «         |                      |	¦  «         |                      |
d¦  «         Œ_| 	                    ¦   «          |  
                    ‰d         |¦  «         |                      |j        ¦  «         d S )N©gš™™™™™©?çš™™™™™¹?râ   c                 ó:   •— ‰                      | |||f¦  «         d S r   rL   )r   r.   r(   ÚdÚLs       €r   rË   z(LoopTests.testBasicFunction.<locals>.fooŒ  s#   ø€ Ø�HŠH�a˜˜A˜q�\Ñ"Ô"Ð"Ð"Ð"r   r   r.   rä   ©rä   râ   c                 ó2   •— ‰                      | ¦  «         d S r   rL   ©r   Ú	theResults    €r   Ú
saveResultz/LoopTests.testBasicFunction.<locals>.saveResult”  ó   ø€ Ø×Ò˜VÑ$Ô$Ð$Ð$Ð$r   rE   zgot %d iterations, not 3r   )NN)r   r$   r   rž   ÚaddCallbackr‚   r%   rÇ   ÚassertIsNonerÈ   ÚassertIsr?   ro   )r   Útimingsr   rË   ÚlcÚDrê   r   r.   r(   rä   rå   ré   s              @@r   ÚtestBasicFunctionzLoopTests.testBasicFunction�  s‹  øø€ ð
 #Ð"Ð"ˆå”
‘”ˆàˆð	#ð 	#ð 	#ð 	#ð 	#ð 	#õ ! ¨¨S°#¸Ð=Ñ=Ô=ˆØ�HŠH�S‰MŒMˆàˆ	ð	%ð 	%ð 	%ð 	%ð 	%ð 	
�Š�jÑ!Ô!Ð!à�
Š
�7ÑÔÐà×Ò�˜Q™œ Ð$>Å#ÀaÁ&Ä&ÀÑ$JÑKÔKÐKàð 	%ð 	%‰JˆAˆq�!�QØ×Ò˜Q Ñ$Ô$Ð$Ø×Ò˜Q Ñ$Ô$Ð$Ø×Ò˜aÑ Ô Ð Ø×Ò˜Q Ñ$Ô$Ð$Ð$à
�Š‰	Œ	ˆ	Ø�Š�i ”l BÑ'Ô'Ð'ð 	×Ò˜œÑ%Ô%Ð%Ð%Ð%r   c                 óô  ‡— g d¢}t          j        ¦   «         }g }t          ||j        d ¦  «        }|                     dd¬¦  «        }g Šˆfd„}|                     |¦  «         |                     |¦  «         |                      t          |¦  «        ddt          |¦  «        fz  ¦  «         | 	                    ¦   «          |  
                    ‰d         |¦  «         |                      |j        ¦  «         d S )	Nrá   râ   Fr³   c                 ó2   •— ‰                      | ¦  «         d S r   rL   rè   s    €r   rê   z.LoopTests.testDelayedStart.<locals>.saveResult´  rë   r   r1   zgot %d iterations, not 2r   )r   r$   r   rM   rž   rì   r‚   r%   rÇ   rÈ   rî   r?   ro   )r   rï   r   rå   rð   rä   rê   ré   s          @r   ÚtestDelayedStartzLoopTests.testDelayedStart©  s÷   ø€ Ø"Ð"Ð"ˆå”
‘”ˆàˆÝ  ¨¬°$Ñ7Ô7ˆØ�HŠH�S˜eˆHÑ$Ô$ˆàˆ	ð	%ð 	%ð 	%ð 	%ð 	%ð 	
�Š�jÑ!Ô!Ð!à�
Š
�7ÑÔÐà×Ò�˜Q™œ Ð$>Å#ÀaÁ&Ä&ÀÑ$JÑKÔKÐKØ
�Š‰	Œ	ˆ	Ø�Š�i ”l BÑ'Ô'Ð'à×Ò˜œÑ%Ô%Ð%Ð%Ð%r   c                 ór   — t          j        d„ ¦  «        }|                      t          |j        d¦  «         d S )Nc                  ó   — d S r   r    r    r   r   r/   z(LoopTests.testBadDelay.<locals>.<lambda>Â  s   €  d€ r   éÿÿÿÿ)r   r–   rT   Ú
ValueErrorrž   )r   rð   s     r   ÚtestBadDelayzLoopTests.testBadDelayÁ  s4   € ÝÔ˜l˜lÑ+Ô+ˆØ×Ò�* b¤h°Ñ3Ô3Ð3Ð3Ð3r   c                 ó  ‡— g Šˆfd„}t          j        ¦   «         }t          ||¦  «        }|                     |d¬¦  «         |                     ¦   «          |                      ‰¦  «         |                      |j        ¦  «         d S )Nc                  ó2   •— ‰                       d ¦  «         d S r   rL   ©Úrans   €r   rË   z$LoopTests._stoppingTest.<locals>.fooÉ  ó   ø€ Ø�JŠJ�tÑÔÐÐÐr   Fr³   )r   r$   r   rž   rÈ   r?   ro   )r   r^   rË   r   rð   rþ   s        @r   Ú_stoppingTestzLoopTests._stoppingTestÆ  s�   ø€ Øˆð	ð 	ð 	ð 	ð 	õ ”
‘”ˆÝ  ¨Ñ,Ô,ˆØ
�Š�˜EˆÑ"Ô"Ð"Ø
�Š‰	Œ	ˆ	Ø×Ò˜ÑÔÐØ×Ò˜œÑ%Ô%Ð%Ð%Ð%r   c                 ó,   — |                       d¦  «        S )Nr   ©r   ©r   s    r   ÚtestStopAtOncezLoopTests.testStopAtOnceÓ  s   € Ø×!Ò! !Ñ$Ô$Ð$r   c                 ó,   — |                       d¦  «        S )NrB   r  r  s    r   ÚtestStoppingBeforeDelayedStartz(LoopTests.testStoppingBeforeDelayedStartÖ  s   € Ø×!Ò! "Ñ%Ô%Ð%r   c                 óŠ  ‡— g Šˆfd„}t          j        ¦   «         }t          ||¦  «        }|                     dd¬¦  «         |                     d¦  «         |                     ¦   «          |                     d¦  «         |                      ‰g ¦  «         |                     d¦  «         |                      ‰dg¦  «         dS )z8
        Test that L{LoopingCall} can be reset.
        c                  ó2   •— ‰                       d ¦  «         d S r   rL   rý   s   €r   rË   z!LoopTests.test_reset.<locals>.fooß  rÿ   r   r1   Fr³   r+   N)r   r$   r   rž   rO   rb   r%   )r   rË   r(   rð   rþ   s       @r   Ú
test_resetzLoopTests.test_resetÙ  sÃ   ø€ ð ˆð	ð 	ð 	ð 	ð 	õ ŒJ‰LŒLˆÝ   CÑ(Ô(ˆØ
�Š�˜ˆÑÔÐØ	�	Š	�!‰ŒˆØ
�Š‰
Œ
ˆ
Ø	�	Š	�!‰ŒˆØ×Ò˜˜bÑ!Ô!Ð!Ø	�	Š	�!‰ŒˆØ×Ò˜˜t˜fÑ%Ô%Ð%Ð%Ð%r   c           	      ó€   — |                       t          t          j        t          dd¬¦  «        ¦  «        d¦  «         dS )zO
        L{LoopingCall.__repr__} includes the wrapped function's name.
        r+   r1   )Úkeyz6LoopingCall<None>(installReactor, *(1,), **{'key': 2})N)r%   Úreprr   r–   r   r  s    r   Útest_reprFunctionzLoopTests.test_reprFunctionì  sF   € ð 	×ÒÝ•Ô!¥.°!¸Ð;Ñ;Ô;Ñ<Ô<ØDñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó„   — |                       t          t          j        t          j        ¦  «        ¦  «        d¦  «         dS )zR
        L{LoopingCall.__repr__} includes the wrapped method's full name.
        z:LoopingCall<None>(TestableLoopingCall.__init__, *(), **{})N)r%   r  r   r–   r   r   r  s    r   Útest_reprMethodzLoopTests.test_reprMethodõ  sC   € ð 	×ÒÝ•Ô!Õ"5Ô">Ñ?Ô?Ñ@Ô@ØHñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óP  — t          j        d„ ¦  «        }|j         d}|                      | j        g¦  «        }|                      dt          |¦  «        ¦  «         |                      t          |d         d         ¦  «         |                      ||d         d         ¦  «         dS )z8
        L{LoopingCall.deferred} is deprecated.
        c                  ó   — d S r   r    r    r   r   r/   z4LoopTests.test_deferredDeprecation.<locals>.<lambda>  rk   r   z€twisted.internet.task.LoopingCall.deferred was deprecated in Twisted 16.0.0; please use the deferred returned by start() insteadr+   r   ÚcategoryÚmessageN)r   r–   rÎ   ÚflushWarningsÚtest_deferredDeprecationr%   rÇ   ÚDeprecationWarning)r   rÊ   r  Úwarningss       r   r  z"LoopTests.test_deferredDeprecationþ  s¤   € õ Ô  Ñ-Ô-ˆàŒˆðBð 	ð
 ×%Ò% tÔ'DÐ&EÑFÔFˆØ×Ò˜�C ™MœMÑ*Ô*Ð*Ø×ÒÕ+¨X°a¬[¸Ô-DÑEÔEÐEØ×Ò˜ (¨1¤+¨iÔ"8Ñ9Ô9Ð9Ð9Ð9r   N)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“   ð   sO  € € € € € ðð ð
.ð .ð .ð2-ð 2-ð 2-ðh +ð  +ð  +ðD8
ð 8
ð 8
ðt'Oð 'Oð 'OðR@)ð @)ð @)ðD/ð /ð /ð4$/ð $/ð $/ðLGGð GGð GGðR&&ð &&ð &&ðP&ð &ð &ð04ð 4ð 4ð
&ð &ð &ð%ð %ð %ð&ð &ð &ð&ð &ð &ð&
ð 
ð 
ð
ð 
ð 
ð:ð :ð :ð :ð :r   r“   c                   ó>   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	S )
ÚReactorLoopTestsc                 óŽ   — d„ }t          j        |d¦  «        }|                      |                     d¦  «        t          ¦  «        S )Nc                 ó    — t          | ¦  «        ‚r   ©r   ri   s    r   rË   z)ReactorLoopTests.testFailure.<locals>.foo  s   € Ý Ñ"Ô"Ð"r   Úbarrâ   ©r   r–   ÚassertFailurerž   r   ©r   rË   rð   s      r   ÚtestFailurezReactorLoopTests.testFailure  sE   € ð	#ð 	#ð 	#õ Ô˜c 5Ñ)Ô)ˆØ×!Ò! "§(¢(¨3¡-¤-µÑ?Ô?Ð?r   c                 ó”   ‡— ˆfd„}t          j        |d¦  «        Š|                      ‰                     d¦  «        t          ¦  «        S )Nc                 óJ   •— ‰                      ¦   «          t          | ¦  «        ‚r   )rÈ   r   )rj   rð   s    €r   rË   z-ReactorLoopTests.testFailAndStop.<locals>.foo  s   ø€ Ø�GŠG‰IŒIˆIÝ Ñ"Ô"Ð"r   r  râ   r  r   s     @r   ÚtestFailAndStopz ReactorLoopTests.testFailAndStop  sP   ø€ ð	#ð 	#ð 	#ð 	#ð 	#õ Ô˜c 5Ñ)Ô)ˆØ×!Ò! "§(¢(¨3¡-¤-µÑ?Ô?Ð?r   c                 ó    ‡ ‡‡— g Šˆˆfd„}t          j        |¦  «        Š‰                     d¦  «        }ˆˆ fd„}|                     |¦  «        S )Nc                  ó„   •— ‰                      d ¦  «         t          ‰¦  «        dk    r‰                      ¦   «          d S d S )NrÌ   rÆ   )rð   rþ   s   €€r   rË   z0ReactorLoopTests.testEveryIteration.<locals>.foo&  s<   ø€ Ø�JŠJ�tÑÔÐÝ�3‰xŒx˜!Š|ˆ|Ø—’‘	”	�	�	�	ð ˆ|r   r   c                 óN   •— ‰                      t          ‰¦  «        d¦  «         d S )Né   )r%   rÇ   )Úignrþ   r   s    €€r   Ústoppedz4ReactorLoopTests.testEveryIteration.<locals>.stopped.  s%   ø€ Ø×Ò�S ™XœX qÑ)Ô)Ð)Ð)Ð)r   )r   r–   rž   rì   )r   rË   rä   r*  rð   rþ   s   `   @@r   ÚtestEveryIterationz#ReactorLoopTests.testEveryIteration#  s{   øøø€ Øˆð	ð 	ð 	ð 	ð 	ð 	õ
 Ô˜cÑ"Ô"ˆØ�HŠH�Q‰KŒKˆð	*ð 	*ð 	*ð 	*ð 	*ð 	*ð �}Š}˜WÑ%Ô%Ð%r   c                 óØ   ‡— t          j        ¦   «         Šˆfd„}t          j        |¦  «        | _        | j                             dd¬¦  «         t          j        d| j        ‰¦  «         ‰S )Nc                  óV   •— ‰                       t          j        d¦  «        ¦  «         d S )Nz'This task also should never get called.)Úerrbackr   ÚDefaultExceptionræ   s   €r   rË   z1ReactorLoopTests.testStopAtOnceLater.<locals>.foo8  s2   ø€ Ø�IŠIÝÔ(Ð)RÑSÔSñô ð ð ð r   r+   Fr³   r   )	r   rÒ   r   r–   Ú_lcrž   r   r3   Ú!_callback_for_testStopAtOnceLater)r   rË   rä   s     @r   ÚtestStopAtOnceLaterz$ReactorLoopTests.testStopAtOnceLater3  st   ø€ õ ŒNÑÔˆð	ð 	ð 	ð 	ð 	õ
 Ô# CÑ(Ô(ˆŒØŒ�Š�q˜eˆÑ$Ô$Ð$ÝÔ˜!˜TÔCÀQÑGÔGÐGØˆr   c                 ón   — | j                              ¦   «          t          j        d|j        d¦  «         d S )Nr   Úsuccess)r0  rÈ   r   r3   rÓ   )r   rä   s     r   r1  z2ReactorLoopTests._callback_for_testStopAtOnceLaterB  s.   € ØŒ�Š‰ŒˆÝÔ˜!˜QœZ¨Ñ3Ô3Ð3Ð3Ð3r   c                 óì   ‡‡— ddg}t          j        ¦   «         Šˆˆfd„}t          ‰|¦  «        Š‰                     d¦  «         ‰                     |¦  «         |                      ‰j        ¦  «         d S )Nçš™™™™™É?gš™™™™™é?c                  ó–   •— t          j        ¦   «         } |                      ˆfd„¦  «         ‰                     d| j        d ¦  «         | S )Nc                 ó,   •— ‰                      ¦   «         S r   )rÈ   )Ú_rð   s    €r   r/   z@ReactorLoopTests.testWaitDeferred.<locals>.foo.<locals>.<lambda>N  s   ø€  B§G¢G¡I¤I€ r   r+   )r   rÒ   rì   r3   rÓ   )rä   r   rð   s    €€r   rË   z.ReactorLoopTests.testWaitDeferred.<locals>.fooL  sI   ø€ Ý”Ñ Ô ˆAØ�MŠMÐ-Ð-Ð-Ð-Ñ.Ô.Ð.Ø�OŠO˜A˜qœz¨4Ñ0Ô0Ð0ØˆHr   )r   r$   r   rž   r‚   r?   ro   )r   rï   rË   r   rð   s      @@r   ÚtestWaitDeferredz!ReactorLoopTests.testWaitDeferredF  s†   øø€ ð ˜�*ˆÝ”
‘”ˆð	ð 	ð 	ð 	ð 	ð 	õ ! ¨Ñ,Ô,ˆØ
�Š�‰ŒˆØ�
Š
�7ÑÔÐØ×Ò˜œÑ%Ô%Ð%Ð%Ð%r   c                 ó  ‡— dg}t          j        ¦   «         Šˆfd„}t          ‰|¦  «        }|                     d¦  «        }|                      |t
          ¦  «         ‰                     |¦  «         |                      ‰j        ¦  «         |S )Nç333333Ó?c                  ó~   •— t          j        ¦   «         } ‰                     d| j        t	          ¦   «         ¦  «         | S )Nr<  )r   rÒ   r3   r.  r   )rä   r   s    €r   rË   z4ReactorLoopTests.testFailurePropagation.<locals>.fooa  s1   ø€ Ý”Ñ Ô ˆAØ�OŠO˜C ¤­M©O¬OÑ<Ô<Ð<ØˆHr   r+   )	r   r$   r   rž   r  r   r‚   r?   ro   )r   rï   rË   rð   rä   r   s        @r   ÚtestFailurePropagationz'ReactorLoopTests.testFailurePropagationW  s“   ø€ ð �%ˆÝ”
‘”ˆð	ð 	ð 	ð 	ð 	õ
 ! ¨Ñ,Ô,ˆØ�HŠH�Q‰KŒKˆØ×Ò˜1�mÑ,Ô,Ð,à�
Š
�7ÑÔÐØ×Ò˜œÑ%Ô%Ð%Øˆr   c                 óL  ‡‡— t          j        ¦   «         }t          j        ¦   «         Šg Šˆˆfd„}t           j                             |¦  «        }||_        |                     dd¬¦  «        Š|                      ‰g ¦  «         | 	                    ddg¦  «         |                      t          ‰¦  «        d¦  «         ‰                     d¦  «         | 	                    dg¦  «         |                      t          ‰¦  «        d¦  «         |                      ‰dd	g¦  «         dS )
a?  
        In the case that the function passed to L{LoopingCall.withCount}
        returns a deferred, which does not fire before the next interval
        elapses, the function should not be run again. And if a function call
        is skipped in this fashion, the appropriate count should be
        provided.
        c                 ó\   •— ‰                      | ¦  «         t          ‰¦  «        dk    r‰S d S ©Nr+   rØ   )ÚpossibleCounträ   ÚdeferredCountss    €€r   ÚcountTrackerz=ReactorLoopTests.test_deferredWithCount.<locals>.countTrackerz  s4   ø€ à×!Ò! -Ñ0Ô0Ð0å�>Ñ"Ô" aÒ'Ð'Ø�à�tr   r6  Fr³   gš™™™™™Ù?r+   Nr1   rE   )r   r$   r   rÒ   r–   r¨   r   rž   r%   r‚   rÇ   rÓ   )r   Ú	testClockrD  rð   rä   rC  s       @@r   Útest_deferredWithCountz'ReactorLoopTests.test_deferredWithCountn  s+  øø€ õ ”J‘L”Lˆ	ÝŒNÑÔˆØˆð	ð 	ð 	ð 	ð 	ð 	õ Ô×'Ò'¨Ñ5Ô5ˆØˆŒØ�HŠH�S˜eˆHÑ$Ô$ˆð 	×Ò˜¨Ñ,Ô,Ð,ð 	�Š˜˜S�zÑ"Ô"Ð"à×Ò�˜^Ñ,Ô,¨aÑ0Ô0Ð0ð 	
�
Š
�4ÑÔÐØ�Š˜�uÑÔÐà×Ò�˜^Ñ,Ô,¨aÑ0Ô0Ð0ð 	×Ò˜¨!¨Q¨Ñ0Ô0Ð0Ð0Ð0r   N)r   r   r   r!  r$  r+  r2  r1  r:  r>  rF  r    r   r   r  r    s’   € € € € € ð@ð @ð @ð@ð @ð @ð&ð &ð &ð ð ð ð4ð 4ð 4ð&ð &ð &ð"ð ð ð.*1ð *1ð *1ð *1ð *1r   r  c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚDeferLaterTestsz'
    Tests for L{task.deferLater}.
    c                 ór  ‡‡— g Št          ¦   «         Šˆˆfd„}t          j        ¦   «         }t          j        |d|dd¬¦  «        }|                     | j        ‰¦  «         |                     d¦  «         |                      ‰g ¦  «         |                     d¦  «         |                      ‰dg¦  «         |S )	zœ
        The L{Deferred} returned by L{task.deferLater} is called back after
        the specified delay with the result of the function passed in.
        c                 ó6   •— ‰                      | |f¦  «         ‰S r   rL   )rË   r  ÚflagÚresultss     €€r   Úcallablez/DeferLaterTests.test_callback.<locals>.callable¨  s   ø€ Ø�NŠN˜C ˜:Ñ&Ô&Ð&ØˆKr   rE   rË   r  )r  r1   r+   )rË   r  )Úobjectr   r$   Ú
deferLaterrì   rî   rO   r%   )r   rM  r   rä   rK  rL  s       @@r   Útest_callbackzDeferLaterTests.test_callback   sÇ   øø€ ð
 ˆÝ‰xŒxˆð	ð 	ð 	ð 	ð 	ð 	õ ”
‘”ˆÝŒO˜E 1 h°¸5ÐAÑAÔAˆØ	�Š�d”m TÑ*Ô*Ð*Ø�Š�aÑÔÐØ×Ò˜ "Ñ%Ô%Ð%Ø�Š�aÑÔÐØ×Ò˜ >Ð"2Ñ3Ô3Ð3Øˆr   c                 óº   — d„ }t          j        ¦   «         }t          j        |d|¦  «        }|                     d¦  «         |                      |t
          ¦  «        S )zƒ
        The L{Deferred} returned by L{task.deferLater} is errbacked if the
        supplied function raises an exception.
        c                  ó   — t          ¦   «         ‚r   r  r    r   r   rM  z.DeferLaterTests.test_errback.<locals>.callable»  s   € Ý‘/”/Ð!r   r+   )r   r$   rO  rO   r  r   )r   rM  r   rä   s       r   Útest_errbackzDeferLaterTests.test_errbackµ  sY   € ð	"ð 	"ð 	"õ ”
‘”ˆÝŒO˜E 1 hÑ/Ô/ˆØ�Š�aÑÔÐØ×!Ò! !¥]Ñ3Ô3Ð3r   c                 ó  ‡ ‡‡— g Št          j        ¦   «         Št          j        ‰d‰j        d¦  «        }|                     ¦   «          ˆˆˆ fd„}‰                      |t          j        ¦  «         |                     |¦  «         |S )zŒ
        The L{Deferred} returned by L{task.deferLater} can be
        cancelled to prevent the call from actually being performed.
        r+   Nc                 ó‚   •— ‰                      g ‰                     ¦   «         ¦  «         ‰                     ‰¦  «         d S r   )r%   rm   r?   )ÚignoredÚcalledr   r   s    €€€r   ÚcbCancelledz0DeferLaterTests.test_cancel.<locals>.cbCancelledÍ  s?   ø€ à×Ò˜R ×!6Ò!6Ñ!8Ô!8Ñ9Ô9Ð9à×Ò˜VÑ$Ô$Ð$Ð$Ð$r   )	r   r$   rO  rM   r>   r  r   ÚCancelledErrorrì   )r   rä   rX  rW  r   s   `  @@r   Útest_cancelzDeferLaterTests.test_cancelÃ  s�   øøø€ ð
 ˆÝ”
‘”ˆÝŒO˜E 1 f¤m°TÑ:Ô:ˆØ	�Š‰
Œ
ˆ
ð	%ð 	%ð 	%ð 	%ð 	%ð 	%ð 	%ð 	×Ò˜1�eÔ2Ñ3Ô3Ð3Ø	�Š�kÑ"Ô"Ð"Øˆr   c                 óü   — t          j        ¦   «         }t          j        |d¦  «        }|                      |¦  «         |                     d¦  «         |                      d|                      |¦  «        ¦  «         dS )z€
        The L{Deferred} returned by L{task.deferLater} fires with C{None}
        when no callback function is passed.
        rx   N)r   r$   rO  ÚassertNoResultrO   rî   rÍ   )r   r   rä   s      r   Útest_noCallbackzDeferLaterTests.test_noCallback×  sn   € õ
 ”
‘”ˆÝŒO˜E 3Ñ'Ô'ˆØ×Ò˜AÑÔÐà�Š�cÑÔÐØ�Š�d˜D×0Ò0°Ñ3Ô3Ñ4Ô4Ð4Ð4Ð4r   N)r   r   r   r‘   rP  rS  rZ  r]  r    r   r   rH  rH  ›  sZ   € € € € € ðð ðð ð ð*4ð 4ð 4ðð ð ð(
5ð 
5ð 
5ð 
5ð 
5r   rH  c                   ó,   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú_FakeReactorc                 óÌ   — d| _         t          j        ¦   «         | _        | j        j        | _        | j        j        | _        | j        j        | _        g | _        g g dœ| _        d S )NF©ÚbeforeÚduring)	Ú_runningr   r$   Ú_clockr3   r&   rm   Ú_whenRunningÚ_shutdownTriggersr  s    r   r   z_FakeReactor.__init__å  sY   € ØˆŒÝ”j‘l”lˆŒØœÔ.ˆŒØ”{Ô*ˆŒØ#œ{Ô:ˆÔØˆÔØ,.¸"Ð!=Ð!=ˆÔÐÐr   c                 ób   — | j         €
 ||i |¤Ž d S | j                              |||f¦  «         d S r   )rf  rM   )r   rM  ÚargsÚkwargss       r   ÚcallWhenRunningz_FakeReactor.callWhenRunningî  sJ   € ØÔÐ$ØˆH�dÐ%˜fÐ%Ð%Ð%Ð%Ð%àÔ×$Ò$ h°°fÐ%=Ñ>Ô>Ð>Ð>Ð>r   c                 óf   — |dv sJ ‚|dk    sJ ‚| j         |                              ||f¦  «         d S )Nra  Úshutdown)rg  rM   )r   ÚphaseÚeventrM  ri  s        r   ÚaddSystemEventTriggerz"_FakeReactor.addSystemEventTriggerô  sL   € ØÐ,Ð,Ð,Ð,Ð,Ø˜
Ò"Ð"Ð"Ð"ØÔ˜uÔ%×,Ò,¨h¸Ð-=Ñ>Ô>Ð>Ð>Ð>r   c                 óš  — d| _         | j        }d| _        |D ]\  }}} ||i |¤Ž Œ| j         rs|                      ¦   «         }|st          d¦  «        ‚| j                             |d                              ¦   «         |                      ¦   «         z
  ¦  «         | j         °s| j        }d| _        |d         |d         z   D ]
\  }} ||Ž  ŒdS )zÀ
        Call timed events until there are no more or the reactor is stopped.

        @raise RuntimeError: When no timed events are left and the reactor is
            still running.
        TNzNo DelayedCalls leftr   rb  rc  )	rd  rf  rm   ÚRuntimeErrorre  rO   r7   r&   rg  )r   ÚwhenRunningrM  ri  rj  ro   ÚshutdownTriggersÚtriggers           r   Úrunz_FakeReactor.runù  s	  € ð ˆŒØÔ'ˆØ ˆÔØ&1ð 	&ð 	&Ñ"ˆH�d˜FØˆH�dÐ%˜fÐ%Ð%Ð%Ð%ØŒmð 	EØ×(Ò(Ñ*Ô*ˆEØð ;Ý"Ð#9Ñ:Ô:Ð:ØŒK×Ò  a¤× 0Ò 0Ñ 2Ô 2°T·\²\±^´^Ñ CÑDÔDÐDð	 Œmð 	Eð
  Ô1ÐØ!%ˆÔØ-¨hÔ7Ð:JÈ8Ô:TÑTð 	ð 	‰MˆG�TØˆG�TˆNˆNˆNð	ð 	r   c                 óH   — | j         st          j        ¦   «         ‚d| _         dS )z#
        Stop the reactor.
        FN)rd  r   ÚReactorNotRunningr  s    r   rÈ   z_FakeReactor.stop  s(   € ð Œ}ð 	,ÝÔ)Ñ+Ô+Ð+ØˆŒˆˆr   N)r   r   r   r   rk  rp  rv  rÈ   r    r   r   r_  r_  ä  s_   € € € € € ð>ð >ð >ð?ð ?ð ?ð?ð ?ð ?ð
ð ð ð,ð ð ð ð r   r_  c                   óT   — 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S )Ú
ReactTestsz3
    Tests for L{twisted.internet.task.react}.
    c                 ó6  ‡— g Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      ‰dg¦  «         |                      |                     ¦   «         d¦  «         dS )ú“
        L{task.react} runs the reactor until the L{Deferred} returned by the
        function it is passed is called back, then stops it.
        c                 óŠ   •— t          j        ¦   «         } | j        d‰j        d¦  «          | j        d|j        d ¦  «         |S ©Nr+   Tr1   ©r   rÒ   r3   rM   rÓ   ©r   ÚfinishedÚ
timePasseds     €r   Úmainz4ReactTests.test_runsUntilAsyncCallback.<locals>.main$  sI   ø€ Ý”~Ñ'Ô'ˆHØˆGÔ˜a Ô!2°DÑ9Ô9Ð9ØˆGÔ˜a Ô!2°DÑ9Ô9Ð9ØˆOr   ©Ú_reactorr   Tr1   N©r_  rT   Ú
SystemExitr   Úreactr%   Úcoder&   ©r   rƒ  ÚrÚ	exitErrorr‚  s       @r   Útest_runsUntilAsyncCallbackz&ReactTests.test_runsUntilAsyncCallback  s    ø€ ð
 ˆ
ð	ð 	ð 	ð 	ð 	õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜ d VÑ,Ô,Ð,Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óþ   — d„ }t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      |                     ¦   «         d¦  «         dS )ú±
        L{task.react} returns quickly if the L{Deferred} returned by the
        function it is passed has already been called back at the time it is
        returned.
        c                 ó*   — t          j        d ¦  «        S r   ©r   Úsucceed©r   s    r   rƒ  z3ReactTests.test_runsUntilSyncCallback.<locals>.main7  s   € Ý”= Ñ&Ô&Ð&r   r„  r   Nr†  ©r   rƒ  r‹  rŒ  s       r   Útest_runsUntilSyncCallbackz%ReactTests.test_runsUntilSyncCallback0  sv   € ð	'ð 	'ð 	'õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óJ  ‡—  G d„ dt           ¦  «        Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      ‰¦  «        }|                      t          |¦  «        d¦  «         dS )úÁ
        L{task.react} runs the reactor until the L{defer.Deferred} returned by
        the function it is passed is errbacked, then it stops the reactor and
        reports the error.
        c                   ó   — e Zd ZdS )ú@ReactTests.test_runsUntilAsyncErrback.<locals>.ExpectedExceptionNr   r    r   r   ÚExpectedExceptionr™  F  ó   € € € € € ØˆDr   rš  c                 ól   •— t          j        ¦   «         } | j        d|j         ‰¦   «         ¦  «         |S rA  ©r   rÒ   r3   r.  ©r   r�  rš  s     €r   rƒ  z3ReactTests.test_runsUntilAsyncErrback.<locals>.mainI  s9   ø€ Ý”~Ñ'Ô'ˆHØˆGÔ˜a Ô!1Ð3DÐ3DÑ3FÔ3FÑGÔGÐGØˆOr   r„  r+   N©
Ú	Exceptionr_  rT   r‡  r   rˆ  r%   r‰  ÚflushLoggedErrorsrÇ   ©r   rƒ  r‹  rŒ  Úerrorsrš  s        @r   Útest_runsUntilAsyncErrbackz%ReactTests.test_runsUntilAsyncErrback?  s½   ø€ ð	ð 	ð 	ð 	ð 	¥	ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	õ
 ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	à×Ò˜˜IœNÑ+Ô+Ð+à×'Ò'Ð(9Ñ:Ô:ˆØ×Ò�˜V™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óš  ‡—  G d„ dt           ¦  «        Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      |                     ¦   «         d¦  «         |  	                    ‰¦  «        }|                      t          |¦  «        d¦  «         dS )úµ
        L{task.react} returns quickly if the L{defer.Deferred} returned by the
        function it is passed has already been errbacked at the time it is
        returned.
        c                   ó   — e Zd ZdS )ú?ReactTests.test_runsUntilSyncErrback.<locals>.ExpectedExceptionNr   r    r   r   rš  r¨  ]  r›  r   rš  c                 ó<   •— t          j         ‰¦   «         ¦  «        S r   ©r   Úfail©r   rš  s    €r   rƒ  z2ReactTests.test_runsUntilSyncErrback.<locals>.main`  s   ø€ Ý”:Ð/Ð/Ñ1Ô1Ñ2Ô2Ð2r   r„  r+   r   N©r   r_  rT   r‡  r   rˆ  r%   r‰  r&   r¡  rÇ   r¢  s        @r   Útest_runsUntilSyncErrbackz$ReactTests.test_runsUntilSyncErrbackV  sÛ   ø€ ð	ð 	ð 	ð 	ð 	¥	ñ 	ô 	ð 	ð	3ð 	3ð 	3ð 	3ð 	3õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(Ø×'Ò'Ð(9Ñ:Ô:ˆØ×Ò�˜V™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óþ   — d„ }t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      |                     ¦   «         d¦  «         |                      d|j        ¦  «         dS )ú½
        L{task.react} doesn't try to stop the reactor if the L{defer.Deferred}
        the function it is passed is called back after the reactor has already
        been stopped.
        c                 óˆ   —  | j         d| j        ¦  «         t          j        ¦   «         } | j        dd|j        d ¦  «         |S ©Nr+   rc  rm  ©r3   rÈ   r   rÒ   rp  rÓ   ©r   r�  s     r   rƒ  z0ReactTests.test_singleStopCallback.<locals>.mainq  sH   € ØˆGÔ˜a ¤Ñ.Ô.Ð.Ý”~Ñ'Ô'ˆHØ)ˆGÔ)¨(°JÀÔ@QÐSWÑXÔXÐXØˆOr   r„  r+   r   N©r_  rT   r‡  r   rˆ  r%   r&   r‰  r”  s       r   Útest_singleStopCallbackz"ReactTests.test_singleStopCallbackj  sv   € ð	ð 	ð 	õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(à×Ò˜˜IœNÑ+Ô+Ð+Ð+Ð+r   c                 óš  ‡—  G d„ dt           ¦  «        Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      |                     ¦   «         d¦  «         |  	                    ‰¦  «        }|                      t          |¦  «        d¦  «         dS )ú»
        L{task.react} doesn't try to stop the reactor if the L{defer.Deferred}
        the function it is passed is errbacked after the reactor has already
        been stopped.
        c                   ó   — e Zd ZdS )ú<ReactTests.test_singleStopErrback.<locals>.ExpectedExceptionNr   r    r   r   rš  rº  „  r›  r   rš  c                 óš   •—  | j         d| j        ¦  «         t          j        ¦   «         } | j        dd|j         ‰¦   «         ¦  «         |S r²  ©r3   rÈ   r   rÒ   rp  r.  rž  s     €r   rƒ  z/ReactTests.test_singleStopErrback.<locals>.main‡  s[   ø€ ØˆGÔ˜a ¤Ñ.Ô.Ð.Ý”~Ñ'Ô'ˆHØ)ˆGÔ)Ø˜* hÔ&6Ð8IÐ8IÑ8KÔ8Kñô ð ð ˆOr   r„  r+   Nr­  r¢  s        @r   Útest_singleStopErrbackz!ReactTests.test_singleStopErrback}  sÛ   ø€ ð	ð 	ð 	ð 	ð 	¥	ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	à×Ò˜˜IœNÑ+Ô+Ð+à×Ò˜Ÿš™œ aÑ(Ô(Ð(Ø×'Ò'Ð(9Ñ:Ô:ˆØ×Ò�˜V™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óî   ‡— g Šˆfd„}t          ¦   «         }|                      t          t          j        |g d¢|¬¦  «        }|                      d|j        ¦  «         |                      ‰g d¢¦  «         dS )úŠ
        L{task.react} passes the elements of the list it is passed as
        positional arguments to the function it is passed.
        c                 ó\   •— ‰                      |||f¦  «         t          j        d ¦  «        S r   ©Úextendr   r’  ©r   rj   ÚyÚzri  s       €r   rƒ  z'ReactTests.test_arguments.<locals>.mainŸ  s+   ø€ Ø�KŠK˜˜A˜q˜	Ñ"Ô"Ð"Ý”= Ñ&Ô&Ð&r   ©r+   r1   rE   r„  r   N©r_  rT   r‡  r   rˆ  r%   r‰  ©r   rƒ  r‹  rŒ  ri  s       @r   Útest_argumentszReactTests.test_arguments˜  s“   ø€ ð
 ˆð	'ð 	'ð 	'ð 	'ð 	'õ ‰NŒNˆØ×%Ò%Ý�œ
 D¨)¨)¨)¸að &ñ 
ô 
ˆ	ð 	×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜˜y˜y˜yÑ)Ô)Ð)Ð)Ð)r   c                 óR  ‡ — ˆ fd„}t          ¦   «         }t          ¦   «         5  t          |¦  «         ‰                      t          t
          j        |g ¦  «        }‰                      d|j        ¦  «         ddd¦  «         n# 1 swxY w Y   ‰  	                    |‰ j
        ¦  «         dS )úp
        L{twisted.internet.reactor} is used if no reactor argument is passed to
        L{task.react}.
        c                 ó:   •— | ‰_         t          j        d ¦  «        S r   ©ÚpassedReactorr   r’  ©r   r   s    €r   rƒ  z,ReactTests.test_defaultReactor.<locals>.main°  s   ø€ Ø!(ˆDÔÝ”= Ñ&Ô&Ð&r   r   N©r_  r	   r   rT   r‡  r   rˆ  r%   r‰  rî   rÎ  ©r   rƒ  r   rŒ  s   `   r   Útest_defaultReactorzReactTests.test_defaultReactorª  sæ   ø€ ð	'ð 	'ð 	'ð 	'ð 	'õ ‘.”.ˆÝ‰[Œ[ð 	0ð 	0Ý˜7Ñ#Ô#Ð#Ø×)Ò)­*µd´jÀ$ÈÑKÔKˆIØ×Ò˜Q 	¤Ñ/Ô/Ð/ð	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	�Š�g˜tÔ1Ñ2Ô2Ð2Ð2Ð2ó   £ABÂBÂBc                 ó°   — d„ }t          ¦   «         }|                      t          t          j        |g |¬¦  «        }|                      d|j        ¦  «         dS )úŒ
        L{task.react} forwards the exit code specified by the C{SystemExit}
        error returned by the passed function, if any.
        c                 óD   — t          j        t          d¦  «        ¦  «        S ©Né   ©r   r«  r‡  r“  s    r   rƒ  z1ReactTests.test_exitWithDefinedCode.<locals>.mainÁ  s   € Ý”:�j¨™nœnÑ-Ô-Ð-r   r„  rØ  NrÇ  r”  s       r   Útest_exitWithDefinedCodez#ReactTests.test_exitWithDefinedCode»  s[   € ð	.ð 	.ð 	.õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÀBÐQRÐ%ÑSÔSˆ	Ø×Ò˜˜Yœ^Ñ,Ô,Ð,Ð,Ð,r   c                 ó°   — d„ }t          ¦   «         }|                      t          t          j        |g |¬¦  «        }|                      d|j        ¦  «         dS )úw
        L{task.react} handles when the reactor is stopped just before the
        returned L{Deferred} fires.
        c                 ó\   ‡ ‡— t          j        ¦   «         Šˆˆ fd„} ‰ j        |¦  «         ‰S )Nc                  óP   •—  ‰j         ¦   «          ‰                      d ¦  «         d S r   ©rÈ   rÓ   ©rä   r   s   €€r   rÈ   z;ReactTests.test_synchronousStop.<locals>.main.<locals>.stopÑ  ó(   ø€ Ø�”‘”�Ø—
’
˜4Ñ Ô Ð Ð Ð r   ©r   rÒ   rk  ©r   rÈ   rä   s   ` @r   rƒ  z-ReactTests.test_synchronousStop.<locals>.mainÎ  sI   øø€ Ý”Ñ Ô ˆAð!ð !ð !ð !ð !ð !ð $ˆGÔ# DÑ)Ô)Ð)ØˆHr   r„  r   NrÇ  r”  s       r   Útest_synchronousStopzReactTests.test_synchronousStopÈ  s[   € ð	ð 	ð 	õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÀBÐQRÐ%ÑSÔSˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ð+Ð+r   c                 ó°   — d„ }t          ¦   «         }|                      t          t          j        |g |¬¦  «        }|                      d|j        ¦  «         dS )úv
        L{task.react} handles when the reactor is stopped and the
        returned L{Deferred} doesn't fire.
        c                 óT   —  | j         d| j        ¦  «         t          j        ¦   «         S rA  ©r3   rÈ   r   rÒ   r“  s    r   rƒ  z.ReactTests.test_asynchronousStop.<locals>.mainâ  s'   € ØˆGÔ˜a ¤Ñ.Ô.Ð.Ý”>Ñ#Ô#Ð#r   r„  r   NrÇ  r”  s       r   Útest_asynchronousStopz ReactTests.test_asynchronousStopÜ  s[   € ð	$ð 	$ð 	$õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÀBÐQRÐ%ÑSÔSˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ð+Ð+r   N©r   r   r   r‘   r�  r•  r¤  r®  r¶  r½  rÉ  rÒ  rÚ  rä  ré  r    r   r   rz  rz    óÃ   € € € € € ðð ð)ð )ð )ð&)ð )ð )ð)ð )ð )ð.)ð )ð )ð(,ð ,ð ,ð&)ð )ð )ð6*ð *ð *ð$3ð 3ð 3ð"-ð -ð -ð,ð ,ð ,ð(,ð ,ð ,ð ,ð ,r   rz  c                   óT   — 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S )ÚReactCoroutineFunctionTestszP
    Tests for L{twisted.internet.task.react} with an C{async def} argument
    c                 ó6  ‡— g Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      ‰dg¦  «         |                      |                     ¦   «         d¦  «         dS )r|  c              “   óš   •K  — t          j        ¦   «         } | j        d‰j        d¦  «          | j        d|j        d ¦  «         |ƒ d {V —†S r~  r  r€  s     €r   rƒ  zEReactCoroutineFunctionTests.test_runsUntilAsyncCallback.<locals>.main÷  sZ   øè è € Ý”~Ñ'Ô'ˆHØˆGÔ˜a Ô!2°DÑ9Ô9Ð9ØˆGÔ˜a Ô!2°DÑ9Ô9Ð9Ø!�>�>�>�>�>�>Ð!r   r„  r   Tr1   Nr†  rŠ  s       @r   r�  z7ReactCoroutineFunctionTests.test_runsUntilAsyncCallbackð  s    ø€ ð
 ˆ
ð	"ð 	"ð 	"ð 	"ð 	"õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜ d VÑ,Ô,Ð,Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óþ   — d„ }t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      |                     ¦   «         d¦  «         dS )r�  c              “   ó:   K  — t          j        d ¦  «        ƒ d {V —†S r   r‘  r“  s    r   rƒ  zDReactCoroutineFunctionTests.test_runsUntilSyncCallback.<locals>.main
  s(   è è € Ýœ tÑ,Ô,Ð,Ð,Ð,Ð,Ð,Ð,Ð,r   r„  r   Nr†  r”  s       r   r•  z6ReactCoroutineFunctionTests.test_runsUntilSyncCallback  sv   € ð	-ð 	-ð 	-õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óJ  ‡—  G d„ dt           ¦  «        Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      ‰¦  «        }|                      t          |¦  «        d¦  «         dS )r—  c                   ó   — e Zd ZdS )úQReactCoroutineFunctionTests.test_runsUntilAsyncErrback.<locals>.ExpectedExceptionNr   r    r   r   rš  rô    r›  r   rš  c              “   ó|   •K  — t          j        ¦   «         } | j        d|j         ‰¦   «         ¦  «         |ƒ d {V —†S rA  r�  rž  s     €r   rƒ  zDReactCoroutineFunctionTests.test_runsUntilAsyncErrback.<locals>.main  sJ   øè è € Ý”~Ñ'Ô'ˆHØˆGÔ˜a Ô!1Ð3DÐ3DÑ3FÔ3FÑGÔGÐGØ!�>�>�>�>�>�>Ð!r   r„  r+   NrŸ  r¢  s        @r   r¤  z6ReactCoroutineFunctionTests.test_runsUntilAsyncErrback  s½   ø€ ð	ð 	ð 	ð 	ð 	¥	ñ 	ô 	ð 	ð	"ð 	"ð 	"ð 	"ð 	"õ
 ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	à×Ò˜˜IœNÑ+Ô+Ð+à×'Ò'Ð(9Ñ:Ô:ˆØ×Ò�˜V™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óš  ‡—  G d„ dt           ¦  «        Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      |                     ¦   «         d¦  «         |  	                    ‰¦  «        }|                      t          |¦  «        d¦  «         dS )r¦  c                   ó   — e Zd ZdS )úPReactCoroutineFunctionTests.test_runsUntilSyncErrback.<locals>.ExpectedExceptionNr   r    r   r   rš  rø  0  r›  r   rš  c              “   óL   •K  — t          j         ‰¦   «         ¦  «        ƒ d {V —†S r   rª  r¬  s    €r   rƒ  zCReactCoroutineFunctionTests.test_runsUntilSyncErrback.<locals>.main3  s3   øè è € ÝœÐ$5Ð$5Ñ$7Ô$7Ñ8Ô8Ð8Ð8Ð8Ð8Ð8Ð8Ð8r   r„  r+   r   Nr­  r¢  s        @r   r®  z5ReactCoroutineFunctionTests.test_runsUntilSyncErrback)  sÛ   ø€ ð	ð 	ð 	ð 	ð 	¥	ñ 	ô 	ð 	ð	9ð 	9ð 	9ð 	9ð 	9õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(Ø×'Ò'Ð(9Ñ:Ô:ˆØ×Ò�˜V™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óþ   — d„ }t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      |                     ¦   «         d¦  «         |                      d|j        ¦  «         dS )r°  c              “   ó˜   K  —  | j         d| j        ¦  «         t          j        ¦   «         } | j        dd|j        d ¦  «         |ƒ d {V —†S r²  r³  r´  s     r   rƒ  zAReactCoroutineFunctionTests.test_singleStopCallback.<locals>.mainD  sY   è è € ØˆGÔ˜a ¤Ñ.Ô.Ð.Ý”~Ñ'Ô'ˆHØ)ˆGÔ)¨(°JÀÔ@QÐSWÑXÔXÐXØ!�>�>�>�>�>�>Ð!r   r„  r+   r   Nrµ  r”  s       r   r¶  z3ReactCoroutineFunctionTests.test_singleStopCallback=  sv   € ð	"ð 	"ð 	"õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	Ø×Ò˜Ÿš™œ aÑ(Ô(Ð(à×Ò˜˜IœNÑ+Ô+Ð+Ð+Ð+r   c                 óš  ‡—  G d„ dt           ¦  «        Šˆfd„}t          ¦   «         }|                      t          t          j        ||¬¦  «        }|                      d|j        ¦  «         |                      |                     ¦   «         d¦  «         |  	                    ‰¦  «        }|                      t          |¦  «        d¦  «         dS )r¸  c                   ó   — e Zd ZdS )úMReactCoroutineFunctionTests.test_singleStopErrback.<locals>.ExpectedExceptionNr   r    r   r   rš  rþ  W  r›  r   rš  c              “   óª   •K  —  | j         d| j        ¦  «         t          j        ¦   «         } | j        dd|j         ‰¦   «         ¦  «         |ƒ d {V —†S r²  r¼  rž  s     €r   rƒ  z@ReactCoroutineFunctionTests.test_singleStopErrback.<locals>.mainZ  sl   øè è € ØˆGÔ˜a ¤Ñ.Ô.Ð.Ý”~Ñ'Ô'ˆHØ)ˆGÔ)Ø˜* hÔ&6Ð8IÐ8IÑ8KÔ8Kñô ð ð "�>�>�>�>�>�>Ð!r   r„  r+   Nr­  r¢  s        @r   r½  z2ReactCoroutineFunctionTests.test_singleStopErrbackP  sÛ   ø€ ð	ð 	ð 	ð 	ð 	¥	ñ 	ô 	ð 	ð	"ð 	"ð 	"ð 	"ð 	"õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÈQÐ%ÑOÔOˆ	à×Ò˜˜IœNÑ+Ô+Ð+à×Ò˜Ÿš™œ aÑ(Ô(Ð(Ø×'Ò'Ð(9Ñ:Ô:ˆØ×Ò�˜V™œ aÑ(Ô(Ð(Ð(Ð(r   c                 óî   ‡— g Šˆfd„}t          ¦   «         }|                      t          t          j        |g d¢|¬¦  «        }|                      d|j        ¦  «         |                      ‰g d¢¦  «         dS )r¿  c              “   ól   •K  — ‰                      |||f¦  «         t          j        d ¦  «        ƒ d {V —†S r   rÁ  rÃ  s       €r   rƒ  z8ReactCoroutineFunctionTests.test_arguments.<locals>.mainr  sA   øè è € Ø�KŠK˜˜A˜q˜	Ñ"Ô"Ð"Ýœ tÑ,Ô,Ð,Ð,Ð,Ð,Ð,Ð,Ð,r   rÆ  r„  r   NrÇ  rÈ  s       @r   rÉ  z*ReactCoroutineFunctionTests.test_argumentsk  s“   ø€ ð
 ˆð	-ð 	-ð 	-ð 	-ð 	-õ ‰NŒNˆØ×%Ò%Ý�œ
 D¨)¨)¨)¸að &ñ 
ô 
ˆ	ð 	×Ò˜˜IœNÑ+Ô+Ð+Ø×Ò˜˜y˜y˜yÑ)Ô)Ð)Ð)Ð)r   c                 óR  ‡ — ˆ fd„}t          ¦   «         }t          ¦   «         5  t          |¦  «         ‰                      t          t
          j        |g ¦  «        }‰                      d|j        ¦  «         ddd¦  «         n# 1 swxY w Y   ‰  	                    |‰ j
        ¦  «         dS )rË  c              “   óJ   •K  — | ‰_         t          j        d ¦  «        ƒ d {V —†S r   rÍ  rÏ  s    €r   rƒ  z=ReactCoroutineFunctionTests.test_defaultReactor.<locals>.mainƒ  s1   øè è € Ø!(ˆDÔÝœ tÑ,Ô,Ð,Ð,Ð,Ð,Ð,Ð,Ð,r   r   NrÐ  rÑ  s   `   r   rÒ  z/ReactCoroutineFunctionTests.test_defaultReactor}  sæ   ø€ ð	-ð 	-ð 	-ð 	-ð 	-õ ‘.”.ˆÝ‰[Œ[ð 	0ð 	0Ý˜7Ñ#Ô#Ð#Ø×)Ò)­*µd´jÀ$ÈÑKÔKˆIØ×Ò˜Q 	¤Ñ/Ô/Ð/ð	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	�Š�g˜tÔ1Ñ2Ô2Ð2Ð2Ð2rÓ  c                 ó°   — d„ }t          ¦   «         }|                      t          t          j        |g |¬¦  «        }|                      d|j        ¦  «         dS )rÕ  c              “   óT   K  — t          j        t          d¦  «        ¦  «        ƒ d {V —†S r×  rÙ  r“  s    r   rƒ  zBReactCoroutineFunctionTests.test_exitWithDefinedCode.<locals>.main”  s.   è è € Ýœ¥J¨r¡N¤NÑ3Ô3Ð3Ð3Ð3Ð3Ð3Ð3Ð3r   r„  rØ  NrÇ  r”  s       r   rÚ  z4ReactCoroutineFunctionTests.test_exitWithDefinedCodeŽ  s[   € ð	4ð 	4ð 	4õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÀBÐQRÐ%ÑSÔSˆ	Ø×Ò˜˜Yœ^Ñ,Ô,Ð,Ð,Ð,r   c                 ó°   — d„ }t          ¦   «         }|                      t          t          j        |g |¬¦  «        }|                      d|j        ¦  «         dS )rÜ  c              “   ól   ‡ ‡K  — t          j        ¦   «         Šˆˆ fd„} ‰ j        |¦  «         ‰ƒ d {V —†S )Nc                  óP   •—  ‰j         ¦   «          ‰                      d ¦  «         d S r   rß  rà  s   €€r   rÈ   zLReactCoroutineFunctionTests.test_synchronousStop.<locals>.main.<locals>.stop¤  rá  r   râ  rã  s   ` @r   rƒ  z>ReactCoroutineFunctionTests.test_synchronousStop.<locals>.main¡  sY   øøè è € Ý”Ñ Ô ˆAð!ð !ð !ð !ð !ð !ð $ˆGÔ# DÑ)Ô)Ð)Ø�7�7�7�7�7�7ˆNr   r„  r   NrÇ  r”  s       r   rä  z0ReactCoroutineFunctionTests.test_synchronousStop›  s[   € ð	ð 	ð 	õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÀBÐQRÐ%ÑSÔSˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ð+Ð+r   c                 ó°   — d„ }t          ¦   «         }|                      t          t          j        |g |¬¦  «        }|                      d|j        ¦  «         dS )ræ  c              “   ód   K  —  | j         d| j        ¦  «         t          j        ¦   «         ƒ d {V —†S rA  rè  r“  s    r   rƒ  z?ReactCoroutineFunctionTests.test_asynchronousStop.<locals>.mainµ  s=   è è € ØˆGÔ˜a ¤Ñ.Ô.Ð.ÝœÑ)Ô)Ð)Ð)Ð)Ð)Ð)Ð)Ð)r   r„  r   NrÇ  r”  s       r   ré  z1ReactCoroutineFunctionTests.test_asynchronousStop¯  s[   € ð	*ð 	*ð 	*õ ‰NŒNˆØ×%Ò%¥jµ$´*¸dÀBÐQRÐ%ÑSÔSˆ	Ø×Ò˜˜IœNÑ+Ô+Ð+Ð+Ð+r   Nrê  r    r   r   rí  rí  ë  rë  r   rí  N)r‘   Útwisted.internetr   r   r   r   r   Útwisted.internet.mainr   Ú#twisted.internet.test.modulehelpersr	   Útwisted.trialr
   r$   Útwisted.pythonr   r–   r   r   r   ÚTestCaser"   r“   r  rH  r_  ÚSynchronousTestCaserz  rí  r    r   r   ú<module>r     s\  ððð ð
 EÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DØ 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9Ø "Ð "Ð "Ð "Ð "Ð "ð 	Œ
€à "Ð "Ð "Ð "Ð "Ð "ðð ð ð ð ˜$Ô*ñ ô ð ð	ð 	ð 	ð 	ð 	�Iñ 	ô 	ð 	ðO+ð O+ð O+ð O+ð O+�Ô"ñ O+ô O+ð O+ðd^:ð ^:ð ^:ð ^:ð ^:�Ô!ñ ^:ô ^:ð ^:ðBG1ð G1ð G1ð G1ð G1�xÔ(ñ G1ô G1ð G1ðTF5ð F5ð F5ð F5ð F5�hÔ'ñ F5ô F5ð F5ðR1ð 1ð 1ð 1ð 1ñ 1ô 1ð 1ðhP,ð P,ð P,ð P,ð P,�Ô-ñ P,ô P,ð P,ðfP,ð P,ð P,ð P,ð P, (Ô">ñ P,ô P,ð P,ð P,ð P,r   