%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_reactormixins.cpython-312.pyc

�

Ϫ�f����dZddlmZmZmZddlmZddlmZddl	m
Z
ddlmZddl
mZmZdd	lmZd
Zdedefd
�ZGd�de�Zy)zS
Tests L{twisted.internet.test.reactormixins}, the reactor-testing support
module.
�)�assert_that�equal_to�
has_length)�NoReturn)�matches_result)�
TestResult)�
TestLoader)�SynchronousTestCase�	TestSuite�)�ReactorBuilderzThis reactor is unsupported.�self�returnc� �tt��)z�
    A function that can be used as a factory for L{ReactorBuilder} tests but
    which always raises an exception.

    This gives the appearance of a reactor type which is unsupported in the
    current runtime configuration for some reason.
    )�	Exception�UNSUPPORTED�rs �J/usr/lib/python3/dist-packages/twisted/internet/test/test_reactormixins.py�unsupportedReactorrs���K�
 � �c��eZdZdZdd�Zy)�ReactorBuilderTestsz&
    Tests for L{ReactorBuilder}.
    Nc�n��Gd�dtt�}|j�j�}t	��t�fd�|D��}t
�}|j|�t|ttd����|j\\}}t|tt��y)z}
        If the reactor factory raises any exception then
        L{ReactorBuilder.buildReactor} raises L{SkipTest}.
        c��eZdZdgZdd�Zy)�HReactorBuilderTests.test_buildReactorFails.<locals>.BrokenReactorFactoryz;twisted.internet.test.test_reactormixins.unsupportedReactorNc�$�|j�y)zQ
                Try, and fail, to build an unsupported reactor.
                N)�buildReactorrs r�test_brokenFactoryz[ReactorBuilderTests.test_buildReactorFails.<locals>.BrokenReactorFactory.test_brokenFactory/s���!�!�#r�rN)�__name__�
__module__�__qualname__�	_reactorsr�rr�BrokenReactorFactoryr*s��M��I�
$rr%c3�@�K�|]}�j|����y�w)N)�	loadClass)�.0�cls�loaders  �r�	<genexpr>z=ReactorBuilderTests.test_buildReactorFails.<locals>.<genexpr>7s�����A�C�&�*�*�3�/�A�s�r)�skipsN)r
r
�makeTestCaseClasses�valuesr	rr�runrrrr,rr)rr%�cases�suite�result�_�skipr*s       @r�test_buildReactorFailsz*ReactorBuilderTests.test_buildReactorFails$s����		$�>�3F�		$�%�8�8�:�A�A�C������A�5�A�A�����
�	�	�&���F�N��A��?�@��l�l���!�T��D�(�;�/�0rr)r r!r"�__doc__r5r$rrrrs���1rrN)r6�hamcrestrrr�typingr�!twisted.trial._dist.test.matchersr�twisted.trial.reporterr�twisted.trial.runnerr	�twisted.trial.unittestr
r�
reactormixinsr
rrrr$rr�<module>r>sK���
7�6��=�-�+�A�)�,��!�^�!��!�1�-�1r

Zerion Mini Shell 1.0