Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/test_importlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/test_importlib/__pycache__/fixtures.cpython-38.pyc
U

?��g��@sddlZddlZddlZddlZddlZddlZddlZejdd��Zejdd��Z	ejdd��Z
ejdd	��ZGd
d�d�ZGdd
�d
e�Z
Gdd�de�ZGdd�dee
�ZGdd�de
�ZGdd�dee
�ZGdd�dee
�Ze��fdd�Zdd�ZGdd�d�ZdS)�Nc	cs*t��}zt�|�VW5t�|�XdS�N)�tempfile�mkdtemp�shutil�rmtree�pathlib�Path)Ztmpdir�r	�;/opt/cppython/lib/python3.8/test/test_importlib/fixtures.py�tempdir
src	cs$t��}z
dVW5t�|�XdSr)�os�getcwd�chdir)Zorigr	r	r
�save_cwds
rc
cs<t��,}t��t�t|��|VW5QRXW5QRXdSr)rrrr�str)�tmpr	r	r
�tempdir_as_cwdsrc	cs*tj�|�z
dVW5tj�|�XdSr)�sys�	meta_path�append�remove)�finderr	r	r
�install_finder$s
rc@seZdZdd�ZdS)�FixturescCst��|_|�|jj�dSr)�
contextlib�	ExitStack�fixturesZ
addCleanup�close��selfr	r	r
�setUp.s
zFixtures.setUpN)�__name__�
__module__�__qualname__r r	r	r	r
r-srcseZdZ�fdd�Z�ZS)�SiteDircs"tt|���|j�t��|_dSr)�superr$r r�
enter_contextr�site_dirr��	__class__r	r
r 4sz
SiteDir.setUp�r!r"r#r �
__classcell__r	r	r(r
r$3sr$cs.eZdZeejdd���Z�fdd�Z�ZS)�	OnSysPathc
cs6t|�gtjdd�<z
dVW5tj�t|��XdS)Nr)rr�pathr)�dirr	r	r
�add_sys_path:s
zOnSysPath.add_sys_pathcs&tt|���|j�|�|j��dSr)r%r,r rr&r/r'rr(r	r
r CszOnSysPath.setUp)	r!r"r#�staticmethodr�contextmanagerr/r r+r	r	r(r
r,9sr,cs.eZdZdddd�dd�Z�fdd�Z�ZS)	�DistInfoPkgz�
                Name: distinfo-pkg
                Author: Steven Ma
                Version: 1.0.0
                Requires-Dist: wheel >= 1.0
                Requires-Dist: pytest; extra == 'test'
                zmod.py,sha256=abc,20
zi
                [entries]
                main = mod:main
                ns:sub = mod:main
            )ZMETADATAZRECORD�entry_points.txt�J
            def main():
                print("hello world")
            )zdistinfo_pkg-1.0.0.dist-info�mod.pycs tt|���ttj|j�dSr)r%r2r �build_files�filesr'rr(r	r
r _szDistInfoPkg.setUp�r!r"r#r7r r+r	r	r(r
r2Hs��r2cseZdZ�fdd�Z�ZS)�DistInfoPkgOffPathcs tt|���ttj|j�dSr)r%r9r r6r2r7r'rr(r	r
r eszDistInfoPkgOffPath.setUpr*r	r	r(r
r9dsr9cs2eZdZdddddd�dd�Z�fd	d
�Z�ZS)�
EggInfoPkga
                Name: egginfo-pkg
                Author: Steven Ma
                License: Unknown
                Version: 1.0.0
                Classifier: Intended Audience :: Developers
                Classifier: Topic :: Software Development :: Libraries
                zW
                mod.py
                egginfo_pkg.egg-info/top_level.txt
            zG
                [entries]
                main = mod:main
            zq
                wheel >= 1.0; python_version >= "2.7"
                [test]
                pytest
            zmod
)zPKG-INFOzSOURCES.txtr3zrequires.txtz
top_level.txtr4)zegginfo_pkg.egg-infor5cs"tt|���ttj|jd�dS�N��prefix)r%r:r r6r7r'rr(r	r
r �szEggInfoPkg.setUpr8r	r	r(r
r:js��r:cs$eZdZddiZ�fdd�Z�ZS)�EggInfoFilezegginfo_file.egg-infoaa
            Metadata-Version: 1.0
            Name: egginfo_file
            Version: 0.1
            Summary: An example package
            Home-page: www.example.com
            Author: Eric Haffa-Vee
            Author-email: eric@example.coms
            License: UNKNOWN
            Description: UNKNOWN
            Platform: UNKNOWN
            cs"tt|���ttj|jd�dSr;)r%r>r r6r7r'rr(r	r
r �szEggInfoFile.setUpr8r	r	r(r
r>�s�r>c
Cs�|��D]�\}}||}t|t�r8|��t||d�qt|t�rd|�d��}|�|�W5QRXq|�d��}|�t|��W5QRXqdS)aBuild a set of files/directories, as described by the

    file_defs dictionary.  Each key/value pair in the dictionary is
    interpreted as a filename/contents pair.  If the contents value is a
    dictionary, a directory is created, and the dictionary interpreted
    as the files within it, recursively.

    For example:

    {"README.txt": "A README file",
     "foo": {
        "__init__.py": "",
        "bar": {
            "__init__.py": "",
        },
        "baz.py": "# Some code",
     }
    }
    r<�wb�wN)	�items�
isinstance�dict�mkdirr6�bytes�open�write�DALS)Z	file_defsr=�name�contentsZ	full_name�fr	r	r
r6�s

r6cCst�|���S)zDedent and left-strip)�textwrap�dedent�lstrip)rr	r	r
rH�srHc@seZdZdd�ZdS)�
NullFindercCsdSrr	)rrIr	r	r
�find_module�szNullFinder.find_moduleN)r!r"r#rPr	r	r	r
rO�srO)rrrrrrLrr1rrrrrr$r,r2r9r:r>rr6rHrOr	r	r	r
�<module>s0



%"

F1le Man4ger