HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_kqueuereactor.cpython-38.pyc
U


W[|�@s�dZddlmZmZddlZddlmZddlmZzddl	m
Z
mZdZWne
k
rddZYnXdd	�Zd
d�ZGdd
�d
e�ZdS)z.
Tests for L{twisted.internet.kqueuereactor}.
�)�division�absolute_importN)�implementer)�TestCase)�
KQueueReactor�_IKQueuezKQueue not available.cOsdS)z
    Do nothing.
    N�)�args�kwargsrr�J/usr/lib/python3/dist-packages/twisted/internet/test/test_kqueuereactor.py�_fakeKEventsrcs$tt�G��fdd�dt��}|�S)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}.
    cseZdZ�Z�ZdS)z"makeFakeKQueue.<locals>.FakeKQueueN)�__name__�
__module__�__qualname__ZkqueueZkeventr��
testKEvent�
testKQueuerr�
FakeKQueue'sr)rr�object)rrrrrr�makeFakeKQueues	rc@seZdZdZeZdd�ZdS)�KQueueTestsz�
    These are tests for L{KQueueReactor}'s implementation, not its real world
    behaviour. For that, look at
    L{twisted.internet.test.reactormixins.ReactorBuilder}.
    cCs,Gdd�dt�}tt|t��}|�d�dS)zV
        L{KQueueReactor} handles L{errno.EINTR} in C{doKEvent} by returning.
        c@seZdZdZdd�ZdS)z*KQueueTests.test_EINTR.<locals>.FakeKQueuez�
            A fake KQueue that raises L{errno.EINTR} when C{control} is called,
            like a real KQueue would if it was interrupted.
            c_sttjd��dS)NZInterrupted)�OSError�errnoZEINTR)�selfr	r
rrr�controlAsz2KQueueTests.test_EINTR.<locals>.FakeKQueue.controlN)r
rr�__doc__rrrrrr<srrN)rrrrZdoKEvent)rrZreactorrrr�
test_EINTR8szKQueueTests.test_EINTRN)r
rrr�
kqueueSkip�skiprrrrrr0sr)rZ
__future__rrrZzope.interfacerZtwisted.trial.unittestrZtwisted.internet.kqreactorrrr�ImportErrorrrrrrrr�<module>s