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

�

Ϫ�f���dZddlZddlmZddlmZGd�de�Z	ddlmZ	e	ZdZe�dZGd	�d
e�Zy#e
$rdZY�wxYw)z&
Tests for twisted.internet.glibbase.
�N)�ensureNotImported)�TestCasec�(�eZdZdZd�Zd�Zd�Zd�Zy)�EnsureNotImportedTestszQ
    L{ensureNotImported} protects against unwanted past and future imports.
    c��i}|jtd|�tddgdgd���|j|dddd��y)z�
        If the specified modules have never been imported, and import
        prevention is requested, L{ensureNotImported} makes sure they will not
        be imported in the future.
        �modules�m1�m2�
A message.)r	r
�m3��preventImportsN��patch�sysr�assertEqual��selfrs  �E/usr/lib/python3/dist-packages/twisted/internet/test/test_glibbase.py�test_ensureWhenNotImportedz1EnsureNotImportedTests.test_ensureWhenNotImportedsA�����
�
�3�	�7�+��4��,��EW�X������T��"F�G�c�v�i}|jtd|�tddgd�|j|i�y)z�
        If the specified modules have never been imported, and import
        prevention is not requested, L{ensureNotImported} has no effect.
        rr	r
rNrrs  r�%test_ensureWhenNotImportedDontPreventz<EnsureNotImportedTests.test_ensureWhenNotImportedDontPrevents7��
���
�
�3�	�7�+��4��,��5�����"�%rc��ddi}|jtd|�tddgdddg��|j|ddd��y)z�
        If the specified modules have been set to L{None} in C{sys.modules},
        L{ensureNotImported} does not complain.
        r
Nrr	rr
)r	r
rrs  r�test_ensureWhenFailedToImportz4EnsureNotImportedTests.test_ensureWhenFailedToImport)sF��
��,���
�
�3�	�7�+��4��,��d�D�\�R������T�":�;rc���t�}d|i}|jtd|�|jtt
ddgdddg��}|j
|d|i�|j
|jd�y)z�
        If one of the specified modules has been previously imported,
        L{ensureNotImported} raises an exception.
        r
rr	rr
)rN)�objectrr�assertRaises�ImportErrorrr�args)r�moduler�es    r�test_ensureFailsWhenImportedz3EnsureNotImportedTests.test_ensureFailsWhenImported3sz��
�����.���
�
�3�	�7�+������
�4�L�� �$�<�
�
��	
����4��.�1��������1rN)�__name__�
__module__�__qualname__�__doc__rrrr#�rrrrs���	H�&�<�2rr)�	gireactorzgi reactor not availablec��eZdZdZeZd�Zy)�GlibReactorBaseTestsz�
    Tests for the private C{twisted.internet._glibbase.GlibReactorBase}
    done via the public C{twisted.internet.gireactor.PortableGIReactor}
    c��tjd��}|jd|j��|j	�y)z�
        C{simulate} can be called without raising any errors when there are
        no delayed calls for the reactor and hence there is no defined sleep
        period.
        F)�useGtkN)r)�PortableGIReactor�assertIs�timeout�simulate)r�suts  r�
test_simulatez"GlibReactorBaseTests.test_simulateZs4���)�)��)�7���
�
�d�C�K�K�M�*����rN)r$r%r&r'�missingGlibReactor�skipr3r(rrr+r+Rs���
�D�
rr+)
r'r�twisted.internet._glibbaser�twisted.trial.unittestrr�twisted.internetr)�
_gireactorrr4r+r(rr�<module>r:se���
�8�+�42�X�42�n�8��I�����3���8������I��s�9�A�A

Zerion Mini Shell 1.0