AnonSec Shell
Server IP : 198.244.165.102  /  Your IP : 216.73.216.156   [ Reverse IP ]
Web Server : nginx/1.24.0
System : Linux modovh-ub-01 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : colleary ( 1011)
PHP Version : 8.3.23
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/twisted/python/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/twisted/python/test/__pycache__/modules_helpers.cpython-312.pyc
�

oj��P�dZddlZddlmZddlmZmZmZddlm	Z	Gd�d�Z
y)z\
Facilities for helping test code which interacts with Python's module system
to load code.
�N)�
ModuleType)�Iterable�List�Tuple)�FilePathc�^�eZdZdZdeeddfd�Zdeeee	fddfd�Z
d
dedeefd	�Zy)�TwistedModulesMixinz�
    A mixin for C{twisted.trial.unittest.SynchronousTestCase} providing useful
    methods for manipulating Python's module system.
    �sysPath�returnNc���tjdd�d�fd�}|j|�|tjddy)zW
        Replace sys.path, for the duration of the test, with the given value.
        Nc�,���tjddy�N)�sys�path)�originalSysPaths��E/usr/lib/python3/dist-packages/twisted/python/test/modules_helpers.py�cleanUpSysPathz:TwistedModulesMixin.replaceSysPath.<locals>.cleanUpSysPaths���)�C�H�H�Q�K��rN)rr�
addCleanup)�selfr
rrs   @r�replaceSysPathz"TwistedModulesMixin.replaceSysPaths2����(�(�1�+��	*�	
����'������r�
sysModulesc����tjj��d�fd�}|j|�tjj	�tjj|�y)zZ
        Replace sys.modules, for the duration of the test, with the given value.
        Nc���tjj�tjj��yr)r�modules�clear�update)�originalSysModuless�r�cleanUpSysModulesz@TwistedModulesMixin.replaceSysModules.<locals>.cleanUpSysModules(s&����K�K�����K�K���1�2rr)rr�copyrrr)rrr rs   @r�replaceSysModulesz%TwistedModulesMixin.replaceSysModules"sN���!�[�[�-�-�/��	3�	
���)�*������������:�&r�pkgnamec��t|j��}|jd�}|j�|jd�j	d�|S)z�
        Generate a L{FilePath} with one package, named C{pkgname}, on it, and
        return the L{FilePath} of the path entry.
        �test_packagez__init__.pyr)r�mktemp�child�makedirs�
setContent)rr#�entry�pkgs    r�pathEntryWithOnePackagez+TwistedModulesMixin.pathEntryWithOnePackage0sG��
�����'���k�k�.�)�������	�	�-� �+�+�C�0��r)r%)
�__name__�
__module__�__qualname__�__doc__r�strrrrrr"rr,�rrr	r	sX���

�d�3�i�
�D�
�'�H�U�3�
�?�5K�,L�'�QU�'�	�s�	��QT�
�	rr	)r0r�typesr�typingrrr�twisted.python.filepathrr	r2rr�<module>r6s%���
��(�(�,�)�)r

Anon7 - 2022
AnonSec Team