+
    DfjF                        R t ^ RIHtHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht  ! R R]4      t ! R R	]4      t]! 4       P                  ]P!                  4       4       ]! 4       P                  ]P!                  4       4       R
# )z/
Tests for implementations of L{IReactorTime}.
)IReactorThreadsIReactorTime)ReactorBuilder)msg)platform)SkipTestc                   6   a  ] tR t^t o Rt]3tR tR tRt	V t
R# )TimeTestsBuilderz9
Builder for defining tests relating to L{IReactorTime}.
c                ~    V P                  4       pVP                  ^ VP                  4       VP                  4        R# )z/
The reactor can be stopped by a delayed call.
N)buildReactor	callLaterstoprun)selfreactors   & A/usr/lib/python3/dist-packages/twisted/internet/test/test_time.pytest_delayedCallStopsReactor-TimeTestsBuilder.test_delayedCallStopsReactor   s/     ##%!W\\*    c                  aaa V P                  4       o\        P                  ! S4      '       d   R oM\        R4      hSP	                  ^^,          ^,           R 4      pV3R loS! SVVV3R l4       SP                  4        V P                  VP                  4       4       V P                  VSP                  4       4       R# )zg
Scheduling a delayed call at a point in the extreme future does not
prevent normal reactor operation.
c                 B    \        R VR7       V P                  V4       R# )z.Thread-based event-source scheduling %(event)r)formateventN)r   callFromThread)r   r   s   &&r   eventSource=TimeTestsBuilder.test_distantDelayedCall.<locals>.eventSource&   s     KSX &&u-r   z=Do not know how to synthesize non-time event to stop the testc                      R # N r   r   r   <lambda>:TimeTestsBuilder.test_distantDelayedCall.<locals>.<lambda>2   s    Dr   c                  >   < \        R 4       S P                  4        R# )zStopping the reactorN)r   r   )r   s   r   r   6TimeTestsBuilder.test_distantDelayedCall.<locals>.stop4   s    &'LLNr   c                     < S ! SS4      # r   r   )r   r   r   s   r   r   r    <   s    [$%?r   N)
r   r   
providedByr   r   r   
assertTrueactiveassertIngetDelayedCalls)r   delayedCallr   r   r   s   & @@@r   test_distantDelayedCall(TimeTestsBuilder.test_distantDelayedCall   s    
 ##%%%g... O 
 ''3
LA	 	G?@ 	 	**,-k7#:#:#<=r   r   N)__name__
__module____qualname____firstlineno____doc__r   requiredInterfacesr   r*   __static_attributes____classdictcell____classdict__s   @r   r	   r	      s#      '*> *>r   r	   c                   h   a  ] tR t^Kt o Rt]3t]P                  ! 4       '       d   RMR.t	R t
RtV tR# )GlibTimeTestsBuilderzU
Builder for defining tests relating to L{IReactorTime} for reactors based
off glib.
z,twisted.internet.gireactor.PortableGIReactorz$twisted.internet.gireactor.GIReactorc                   aaa ^ RI Hp V P                  4       o. oVV3R lpVV3R loSP                  VP                  ^
V4       V P                  S^4       V P                  SR.4       R# )z
A
L{reactor.callLater<twisted.internet.interfaces.IReactorTime.callLater>}
call scheduled from a C{gobject.timeout_add}
call is run on time.
)GObjectc                  ,   < SP                  ^ S 4       ^ # )    )r   )callbackr   s   r   	gschedule8GlibTimeTestsBuilder.test_timeout_add.<locals>.gschedulef   s    a*r   c                  J   < SP                  R 4       S P                  4        R# )TN)appendr   )r   results   r   r<   7GlibTimeTestsBuilder.test_timeout_add.<locals>.callbackj   s    MM$LLNr   TN)gi.repositoryr9   r   callWhenRunningtimeout_add
runReactorassertEqual)r   r9   r=   r<   r   rA   s   &  @@@r   test_timeout_add%GlibTimeTestsBuilder.test_timeout_addY   s_     	*##%		 	 3 3RC#$(r   r   N)r,   r-   r.   r/   r0   r   r1   r   	isWindows	_reactorsrH   r2   r3   r4   s   @r   r7   r7   K   s>     
 '  	73I) )r   r7   N)r0   twisted.internet.interfacesr   r   #twisted.internet.test.reactormixinsr   twisted.python.logr   twisted.python.runtimer   twisted.trial.unittestr   r	   r7   globalsupdatemakeTestCaseClassesr   r   r   <module>rT      sl    F > " + +9>~ 9>x%)> %)P 	  !557 8 	  %99; <r   