Your IP : 216.73.216.213


Current Path : /opt/alt/python38/lib64/python3.8/test/test_importlib/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/test/test_importlib/__pycache__/fixtures.cpython-38.opt-2.pyc

U

i�f��@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)�tempfileZmkdtemp�shutilZrmtree�pathlib�Path)Ztmpdir�r�A/opt/alt/python38/lib64/python3.8/test/test_importlib/fixtures.py�tempdir
sr	c	cs$t��}z
dVW5t�|�XdSr)�os�getcwd�chdir)Zorigrrr�save_cwds
r
c
cs<t��,}t��t�t|��|VW5QRXW5QRXdSr)r	r
r
r�str)Ztmprrr�tempdir_as_cwdsrc	cs*tj�|�z
dVW5tj�|�XdSr)�sys�	meta_path�append�remove)�finderrrr�install_finder$s
rc@seZdZdd�ZdS)�FixturescCst��|_|�|jj�dSr)�
contextlib�	ExitStack�fixturesZ
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__rrr4sz
SiteDir.setUp�rrr r�
__classcell__rrr%rr!3sr!cs.eZdZeejdd���Z�fdd�Z�ZS)�	OnSysPathc
cs6t|�gtjdd�<z
dVW5tj�t|��XdS)Nr)rr�pathr)�dirrrr�add_sys_path:s
zOnSysPath.add_sys_pathcs&tt|���|j�|�|j��dSr)r"r)rrr#r,r$rr%rrrCszOnSysPath.setUp)	rrr �staticmethodr�contextmanagerr,rr(rrr%rr)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"r/r�build_files�filesr$rr%rrr_szDistInfoPkg.setUp�rrr r4rr(rrr%rr/Hs��r/cseZdZ�fdd�Z�ZS)�DistInfoPkgOffPathcs tt|���ttj|j�dSr)r"r6rr3r/r4r$rr%rrreszDistInfoPkgOffPath.setUpr'rrr%rr6dsr6cs2eZdZdddddd�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.txtr0zrequires.txtz
top_level.txtr1)zegginfo_pkg.egg-infor2cs"tt|���ttj|jd�dS�N��prefix)r"r7rr3r4r$rr%rrr�szEggInfoPkg.setUpr5rrr%rr7js��r7cs$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�dSr8)r"r;rr3r4r$rr%rrr�szEggInfoFile.setUpr5rrr%rr;�s�r;c
Cs�|��D]�\}}||}t|t�r8|��t||d�qt|t�rd|�d��}|�|�W5QRXq|�d��}|�t|��W5QRXqdS)Nr9�wb�w)	�items�
isinstance�dict�mkdirr3�bytes�open�write�DALS)Z	file_defsr:�name�contentsZ	full_name�frrrr3�s

r3cCst�|���Sr)�textwrap�dedent�lstrip)rrrrrE�srEc@seZdZdd�ZdS)�
NullFindercCsdSrr)rrFrrr�find_module�szNullFinder.find_moduleN)rrr rMrrrrrL�srL)r
rrrrrIrr.r	r
rrrr!r)r/r6r7r;rr3rErLrrrr�<module>s0



%"