%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/internet/test/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/internet/test/__pycache__/test_kqueuereactor.cpython-312.pyc

�

Ϫ�f����dZddlmZddlZddlmZddlmZ	ddlm	Z	m
Z
dZdd�Z
d
d	�ZGd
�de�Zy#e$rdZY�wxYw)z.
Tests for L{twisted.internet.kqueuereactor}.
�)�annotationsN)�implementer)�TestCase)�
KQueueReactor�_IKQueuezKQueue not available.c��y)z
    Do nothing.
    N�)�args�kwargss  �J/usr/lib/python3/dist-packages/twisted/internet/test/test_kqueuereactor.py�_fakeKEventr
s��c�R���tt�G��fd�d��}|�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}.
    c���eZdZW�ZW�Zy)�"makeFakeKQueue.<locals>.FakeKQueueN)�__name__�
__module__�__qualname__�kqueue�kevent)�
testKEvent�
testKQueues��r�
FakeKQueuer's
������rr)rr)rrrs`` r�makeFakeKQueuers+�����������<�rc��eZdZdZeZdd�Zy)�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�l�Gd�d�}tt|t��}|jd�y)zV
        L{KQueueReactor} handles L{errno.EINTR} in C{doKEvent} by returning.
        c��eZdZdZdd�Zy)�*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�6�ttjd��)N�Interrupted)�OSError�errno�EINTR)�selfr
rs   r�controlz2KQueueTests.test_EINTR.<locals>.FakeKQueue.controlCs���e�k�k�=�9�9rN�r
�objectrr(�return�None)rrr�__doc__r&r	rrrr=s��
�

:rrrN)rrr
�doKEvent)r%r�reactors   r�
test_EINTRzKQueueTests.test_EINTR8s/��
	:�	:� ��z�;� G�H��	����rN)r)r*)rrrr+�
kqueueSkip�skipr.r	rrrr/s����D�rrr')rr(rr(r)r)r+�
__future__rr#�zope.interfacer�twisted.trial.unittestr�twisted.internet.kqreactorrrr/�ImportErrorr
rrr	rr�<module>r6sQ���#��&�+�)�B��J�
��$�(���9�)�(�J�)�s�
8�A�A

Zerion Mini Shell 1.0