Your IP : 216.73.216.85


Current Path : /opt/alt/python39/lib64/python3.9/test/test_importlib/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/test/test_importlib/__pycache__/fixtures.cpython-39.pyc

a

XC?h�@s2ddlZddlZddlZddlZddlZddlZddlZddlZejdd��Z	ejdd��Z
ejdd��Zejdd	��ZGd
d�d�Z
Gdd
�d
e
�ZGdd�de
�ZGdd�dee�ZGdd�de�ZGdd�dee�ZGdd�dee�ZGdd�d�Ze��fdd�ZGdd�d�Zdd�ZGd d!�d!�ZdS)"�Nc	cs4t��}zt�|�VWt�|�nt�|�0dS�N)�tempfileZmkdtemp�pathlib�Path�shutilZrmtree)Ztmpdir�r�A/opt/alt/python39/lib64/python3.9/test/test_importlib/fixtures.py�tempdirsr	c	cs.t��}zdVWt�|�nt�|�0dSr)�os�getcwd�chdir)Zorigrrr�save_cwdsr
c	csdt��J}t��$t�t|��|VWd�n1s80YWd�n1sV0YdSr)r	r
r
r�str)�tmprrr�tempdir_as_cwdsrc	cs6tj�|�zdVWtj�|�ntj�|�0dSr)�sys�	meta_path�append�remove)�finderrrr�install_finder%src@seZdZdd�ZdS)�FixturescCst��|_|�|jj�dSr)�
contextlib�	ExitStack�fixtures�
addCleanup�close��selfrrr�setUp/s
zFixtures.setUpN)�__name__�
__module__�__qualname__rrrrrr.srcseZdZ�fdd�Z�ZS)�SiteDircs"tt|���|j�t��|_dSr)�superr#rr�
enter_contextr	�site_dirr��	__class__rrr5sz
SiteDir.setUp�r r!r"r�
__classcell__rrr'rr#4sr#cs.eZdZeejdd���Z�fdd�Z�ZS)�	OnSysPathc
csFt|�gtjdd�<zdVWtj�t|��ntj�t|��0dS)Nr)rr�pathr)�dirrrr�add_sys_path;szOnSysPath.add_sys_pathcs&tt|���|j�|�|j��dSr)r$r+rrr%r.r&rr'rrrDszOnSysPath.setUp)	r r!r"�staticmethodr�contextmanagerr.rr*rrr'rr+:s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$r1r�build_files�filesr&rr'rrr`szDistInfoPkg.setUp�r r!r"r6rr*rrr'rr1Is��r1cseZdZ�fdd�Z�ZS)�DistInfoPkgOffPathcs tt|���ttj|j�dSr)r$r8rr5r1r6r&rr'rrrfszDistInfoPkgOffPath.setUpr)rrr'rr8esr8cs2eZdZdddddd�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.txtr2zrequires.txtz
top_level.txtr3)zegginfo_pkg.egg-infor4cs"tt|���ttj|jd�dS�N��prefix)r$r9rr5r6r&rr'rrr�szEggInfoPkg.setUpr7rrr'rr9ks��r9cs$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=rr5r6r&rr'rrr�szEggInfoFile.setUpr7rrr'rr=�s�r=c@seZdZddiZdd�ZdS)�LocalPackagezsetup.pyzk
            import setuptools
            setuptools.setup(name="local-pkg", version="2.0.1")
            cCs4t��|_|�|jj�|j�t��t|j�dSr)	rrrrrr%rr5r6rrrrr�s
zLocalPackage.setUpN)r r!r"r6rrrrrr>�s�r>c	Cs�|��D]�\}}||}t|t�r8|��t||d�qt|t�rx|�d��}|�|�Wd�q�1sl0Yq|�d��}|�t|��Wd�q1s�0YqdS)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;�wbN�w)	�items�
isinstance�dict�mkdirr5�bytes�open�write�DALS)Z	file_defsr<�name�contentsZ	full_name�frrrr5�s

*r5c@seZdZdd�Zdd�ZdS)�FileBuildercCs4zddl}Wnty YdS0|jjp2|�d�S)Nru☃z'File system does not support non-ascii.)Ztest.support�ImportErrorZsupportZFS_NONASCII�skip)r�testrrr�unicode_filename�s�zFileBuilder.unicode_filenamecCst�|��dSr)�unittestZSkipTest)r�reasonrrrrN�szFileBuilder.skipN)r r!r"rPrNrrrrrL�s	rLcCst�|���S)zDedent and left-strip)�textwrap�dedent�lstrip)rrrrrH�srHc@seZdZdd�ZdS)�
NullFindercCsdSrr)rrIrrr�find_module�szNullFinder.find_moduleN)r r!r"rWrrrrrV�srV)r
rrrrrSrrQr0r	r
rrrr#r+r1r8r9r=r>rr5rLrHrVrrrr�<module>s6



%"