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: //lib/python3/dist-packages/twisted/internet/test/__pycache__/test_glibbase.cpython-38.pyc
U


W[��@sHdZddlmZmZddlZddlmZddlmZGdd�de�Z	dS)z&
Tests for twisted.internet.glibbase.
�)�division�absolute_importN)�TestCase)�ensureNotImportedc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�EnsureNotImportedTestszQ
    L{ensureNotImported} protects against unwanted past and future imports.
    cCsBi}|�td|�tddgddddgd�|�|dddd��dS)	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.�m3�ZpreventImportsN)rr	r��patch�sysr�assertEqual��selfr�r�E/usr/lib/python3/dist-packages/twisted/internet/test/test_glibbase.py�test_ensureWhenNotImporteds
�z1EnsureNotImportedTests.test_ensureWhenNotImportedcCs0i}|�td|�tddgd�|�|i�dS)z�
        If the specified modules have never been imported, and import
        prevention is not requested, L{ensureNotImported} has no effect.
        rrr	r
Nr
rrrr�%test_ensureWhenNotImportedDontPrevent"sz<EnsureNotImportedTests.test_ensureWhenNotImportedDontPreventcCsBddi}|�td|�tddgdddgd�|�|ddd��dS)z�
        If the specified modules have been set to L{None} in C{sys.modules},
        L{ensureNotImported} does not complain.
        r	Nrrr
r)rr	r
rrrr�test_ensureWhenFailedToImport-sz4EnsureNotImportedTests.test_ensureWhenFailedToImportcCsZt�}d|i}|�td|�|jttddgdddgd�}|�|d|i�|�|jd�dS)z�
        If one of the specified modules has been previously imported,
        L{ensureNotImported} raises an exception.
        r	rrr
r)r
N)�objectrrZassertRaises�ImportErrorrr�args)r�moduler�errr�test_ensureFailsWhenImported8s�z3EnsureNotImportedTests.test_ensureFailsWhenImportedN)�__name__�
__module__�__qualname__�__doc__rrrrrrrrrs

r)
r!Z
__future__rrrZtwisted.trial.unittestrZtwisted.internet._glibbaserrrrrr�<module>s