+
    Dfj                        R t ^ RIHt ^ RIt^ RIHt ^ RIHt  ^ RIH	t	H
t
 RtR R ltR	 R
 lt ! R R]4      tR#   ] d    Rt L$i ; i)z.
Tests for L{twisted.internet.kqueuereactor}.
)annotationsN)implementer)TestCase)KQueueReactor_IKQueuezKQueue not available.c               $    V ^8  d   QhRRRRRR/#    argsobjectkwargsreturnNone )formats   "J/usr/lib/python3/dist-packages/twisted/internet/test/test_kqueuereactor.py__annotate__r      s!      v  D     c                     R# )z
Do nothing.
Nr   )r
   r   s   *,r   _fakeKEventr      s    r   c               $    V ^8  d   QhRRRRRR/# )r	   
testKQueuer   
testKEventr   r   r   )r   s   "r   r   r      s!      v 6 h r   c                T   a a \        \        4       ! VV 3R lR4      4       pV! 4       # )a  
Create a fake that implements L{_IKQueue}.

@param testKQueue: Something that acts like L{select.kqueue}.
@param testKEvent: Something that acts like L{select.kevent}.
@return: An implementation of L{_IKQueue} that includes C{testKQueue} and
    C{testKEvent}.
c                  $   < ] tR t^'t Zt Z tRtR# )"makeFakeKQueue.<locals>.FakeKQueuer   N)__name__
__module____qualname____firstlineno__kqueuekevent__static_attributes__)r   r   s   r   
FakeKQueuer   '   s    r   r#   )r   r   )r   r   r#   s   ff r   makeFakeKQueuer$      s+        <r   c                  *    ] tR t^/tRt]tR R ltRtR# )KQueueTestsz
These are tests for L{KQueueReactor}'s implementation, not its real world
behaviour. For that, look at
L{twisted.internet.test.reactormixins.ReactorBuilder}.
c                   V ^8  d   QhRR/# )r	   r   r   r   )r   s   "r   r   KQueueTests.__annotate__8   s      D r   c                n     ! R R4      p\        \        V\        4      4      pVP                  ^ 4       R# )zF
L{KQueueReactor} handles L{errno.EINTR} in C{doKEvent} by returning.
c                  &    ] tR t^=tRtR R ltRtR# )*KQueueTests.test_EINTR.<locals>.FakeKQueuezu
A fake KQueue that raises L{errno.EINTR} when C{control} is called,
like a real KQueue would if it was interrupted.
c               $    V ^8  d   QhRRRRRR/# r   r   )r   s   "r   r   7KQueueTests.test_EINTR.<locals>.FakeKQueue.__annotate__C   s!     : :V :v :$ :r   c                	6    \        \        P                  R 4      h)Interrupted)OSErrorerrnoEINTR)selfr
   r   s   &*,r   control2KQueueTests.test_EINTR.<locals>.FakeKQueue.controlC   s    ekk=99r   r   N)r   r   r   r   __doc__r4   r"   r   r   r   r#   r+   =   s    
: :r   r#   N)r   r$   r   doKEvent)r3   r#   reactors   &  r   
test_EINTRKQueueTests.test_EINTR8   s/    
	: 	:  z; GH 	r   r   N)	r   r   r   r   r6   
kqueueSkipskipr9   r"   r   r   r   r&   r&   /   s     D r   r&   )r6   
__future__r   r1   zope.interfacer   twisted.trial.unittestr   twisted.internet.kqreactorr   r   r;   ImportErrorr   r$   r&   r   r   r   <module>rB      sQ    #  & +)BJ
$( 9  )(J)s   
= 	A	A	