Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_importlib/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_importlib/__pycache__/fixtures.cpython-312.pyc

�

)Μgz/��h�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddl
mZddlmZ	ddlmZeed�eed	�ej,d
��Zej,d��Zej,d��Zej,d
��ZGd�d�ZGd�de�ZGd�de�ZGd�dee�ZGd�dee�ZGd�dee�Z Gd�de�Z!Gd�dee�Z"Gd�dee�Z#Gd �d!ee�Z$Gd"�d#ee�Z%Gd$�d%ee�Z&Gd&�d'ee�Z'ejPjRe*Z+ejPjYe*d(��ejZZ.d)�Z/d*�Z0Gd+�d,�Z1d-�Z2e�Gd.�d/��Z3d0�Z4y#eef$rddlZY��ZwxYw)1�N)�FS_NONASCII)�
requires_zlib�)�_path)�	FilesSpec)�	resources�files�as_filec#��K�tj�}	tj|���t	j
|�y#t	j
|�wxYw�w�N)�tempfile�mkdtemp�pathlib�Path�shutil�rmtree)�tmpdirs �9/usr/local/lib/python3.12/test/test_importlib/fixtures.py�tempdirrs@����
�
�
�
�F���l�l�6�"�"��
�
�f����
�
�f��s�A�A�A�A�Ac#�K�tj�}	d��tj|�y#tj|�wxYw�wr)�os�getcwd�chdir)�origs r�save_cwdr$s/����
�9�9�;�D��
�
�����������s�A�2�A�A	�	Ac#��K�t�5}t�5tjt	|��|��ddd�ddd�y#1swY�xYw#1swYyxYw�wr)rrrr�str)�tmps r�tempdir_as_cwdr-s@����	��c�
�Z��H�H�S��X���I��
��
�Z��
��s2�A$�A�#A�A�	A$�A	�A�A!�A$c#��K�tjj|�	d��tjj|�y#tjj|�wxYw�wr)�sys�	meta_path�append�remove)�finders r�install_finderr&5sD�����M�M���� �%�
��
�
���V�$���
�
���V�$�s� A+�A� A+�!A(�(A+c��eZdZd�Zy)�Fixturesc��tj�|_|j|jj�yr)�
contextlib�	ExitStack�fixtures�
addCleanup�close��selfs r�setUpzFixtures.setUp?s(��"�,�,�.��
�����
�
�+�+�,�N)�__name__�
__module__�__qualname__r1�r2rr(r(>s��-r2r(c���eZdZ�fd�Z�xZS)�SiteDirc�r��t�|��|jjt	��|_yr)�superr1r,�
enter_contextr�site_dir�r0�	__class__s �rr1z
SiteDir.setUpEs$���
��
���
�
�3�3�G�I�>��
r2�r3r4r5r1�
__classcell__�r>s@rr8r8Ds
���?�?r2r8c�L��eZdZeej
d���Z�fd�Z�xZS)�	OnSysPathc#�K�t|�gtjdd	d��tjjt|��y#tjjt|��wxYw�w)Nr)rr!�pathr$)�dirs r�add_sys_pathzOnSysPath.add_sys_pathKsM�����C��z�����!��	&���H�H�O�O�C��H�%��C�H�H�O�O�C��H�%�s�A;�A�)A;�*A8�8A;c���t�|��|jj|j	|j
��yr)r:r1r,r;rGr<r=s �rr1zOnSysPath.setUpTs-���
��
���
�
�#�#�D�$5�$5�d�m�m�$D�Er2)	r3r4r5�staticmethodr*�contextmanagerrGr1r@rAs@rrCrCJs/�������&���&�F�Fr2rCc�B��eZdZUdddd�dd�Zeed<�fd�Zd	�Z�xZS)
�DistInfoPkgaL
                Name: distinfo-pkg
                Author: Steven Ma
                Version: 1.0.0
                Requires-Dist: wheel >= 1.0
                Requires-Dist: pytest; extra == 'test'
                Keywords: sample package

                Once upon a time
                There was a distinfo pkg
                zmod.py,sha256=abc,20
zi
                [entries]
                main = mod:main
                ns:sub = mod:main
            )�METADATA�RECORD�entry_points.txt�J
            def main():
                print("hello world")
            )�distinfo_pkg-1.0.0.dist-info�mod.pyr	c�j��t�|��ttj|j
�yr�r:r1�build_filesrLr	r<r=s �rr1zDistInfoPkg.setUpt� ���
��
���K�%�%�t�}�}�5r2c���tj|jdz�tjt
j�}|d}|dj�|d<t||j�y)z=
        Rewrite metadata with everything uppercase.
        rQrMN)	rrr<�copy�deepcopyrLr	�upperrU)r0r	�infos   r�make_uppercasezDistInfoPkg.make_uppercasexs_��	�
�
�d�m�m�&D�D�E��
�
�k�/�/�0���3�4���
�+�1�1�3��Z���E�4�=�=�)r2)	r3r4r5r	r�__annotations__r1r\r@rAs@rrLrLYs4���
�/�!�)
�&�)�E�9��46�*r2rLc�6��eZdZUdddiiZeed<�fd�Z�xZS)�DistInfoPkgWithDotzpkg_dot-1.0.0.dist-inforM�N
                Name: pkg.dot
                Version: 1.0.0
                r	c�j��t�|��ttj|j
�yr)r:r1rUr_r	r<r=s �rr1zDistInfoPkgWithDot.setUp�s!���
��
���&�,�,�d�m�m�<r2�r3r4r5r	rr]r1r@rAs@rr_r_�s+���!���$
��E�9��=�=r2r_c�<��eZdZUddiddid�Zeed<�fd�Z�xZS)�DistInfoPkgWithDotLegacyrMr`zN
                Name: pkg.lot
                Version: 1.0.0
                )zpkg.dot-1.0.0.dist-infozpkg.lot.egg-infor	c�j��t�|��ttj|j
�yr)r:r1rUrdr	r<r=s �rr1zDistInfoPkgWithDotLegacy.setUp�s!���
��
���,�2�2�D�M�M�Br2rbrAs@rrdrd�s;���
��$
�
��
�
�E�9�
�C�Cr2rdc���eZdZ�fd�Z�xZS)�DistInfoPkgOffPathc�j��t�|��ttj|j
�yrrTr=s �rr1zDistInfoPkgOffPath.setUp�rVr2r?rAs@rrgrg�s
���6�6r2rgc�@��eZdZUdddddd�dd�Zeed	<�fd
�Z�xZS)�
EggInfoPkga�
                Name: egginfo-pkg
                Author: Steven Ma
                License: Unknown
                Version: 1.0.0
                Classifier: Intended Audience :: Developers
                Classifier: Topic :: Software Development :: Libraries
                Keywords: sample package
                Description: Once upon a time
                        There was an egginfo package
                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
)�PKG-INFO�SOURCES.txtrOzrequires.txt�
top_level.txtrP)zegginfo_pkg.egg-inforRr	c�l��t�|��ttj|j
��y�N)�prefix)r:r1rUrjr	r<r=s �rr1zEggInfoPkg.setUp�s ���
��
���J�$�$�T�]�]�;r2rbrAs@rrjrj�s?���
��!��
%�3!
�6�9 �E�9� �D<�<r2rjc�<��eZdZUdddd�dd�Zeed<�fd�Z�xZS)	� EggInfoPkgPipInstalledNoToplevel�Name: egg_with_module-pkgz�
                egg_with_module.py
                setup.py
                egg_with_module_pkg.egg-info/PKG-INFO
                egg_with_module_pkg.egg-info/SOURCES.txt
                egg_with_module_pkg.egg-info/top_level.txt
            z�
                ../egg_with_module.py
                PKG-INFO
                SOURCES.txt
                top_level.txt
            �rkrl�installed-files.txtrP�zegg_with_module_pkg.egg-infozegg_with_module.pyr	c�l��t�|��ttj|j
��yro)r:r1rUrrr	r<r=s �rr1z&EggInfoPkgPipInstalledNoToplevel.setUp�s!���
��
���4�:�:�4�=�=�Qr2rbrAs@rrrrr�s6���4��$�)
�,�/�E�9��:R�Rr2rrc�<��eZdZUdddd�dd�Zeed<�fd�Z�xZS)	�'EggInfoPkgPipInstalledExternalDataFilesrsa
                egg_with_module.py
                setup.py
                egg_with_module.json
                egg_with_module_pkg.egg-info/PKG-INFO
                egg_with_module_pkg.egg-info/SOURCES.txt
                egg_with_module_pkg.egg-info/top_level.txt
            a
                ../../../etc/jupyter/jupyter_notebook_config.d/relative.json
                /etc/jupyter/jupyter_notebook_config.d/absolute.json
                ../egg_with_module.py
                PKG-INFO
                SOURCES.txt
                top_level.txt
            rtrPrvr	c�l��t�|��ttj|j
��yro)r:r1rUryr	r<r=s �rr1z-EggInfoPkgPipInstalledExternalDataFiles.setUps!���
��
���;�A�A�$�-�-�Xr2rbrAs@rryry�s7���4��$�)
�2�5�E�9��@Y�Yr2ryc�<��eZdZUdddddd�iZeed<�fd�Z�xZS)	�EggInfoPkgPipInstalledNoModulesz egg_with_no_modules_pkg.egg-infozName: egg_with_no_modules-pkgz�
                setup.py
                egg_with_no_modules_pkg.egg-info/PKG-INFO
                egg_with_no_modules_pkg.egg-info/SOURCES.txt
                egg_with_no_modules_pkg.egg-info/top_level.txt
            z`
                PKG-INFO
                SOURCES.txt
                top_level.txt
            �
)rkrlrurmr	c�l��t�|��ttj|j
��yro)r:r1rUr|r	r<r=s �rr1z%EggInfoPkgPipInstalledNoModules.setUp7s!���
��
���3�9�9�$�-�-�Pr2rbrAs@rr|r|s7���*�7��$�#�'-
��E�9��0Q�Qr2r|c�:��eZdZUddd�dd�Zeed<�fd�Z�xZS)�EggInfoPkgSourcesFallbackzName: sources_fallback-pkgz�
                sources_fallback.py
                setup.py
                sources_fallback_pkg.egg-info/PKG-INFO
                sources_fallback_pkg.egg-info/SOURCES.txt
            )rkrlrP)zsources_fallback_pkg.egg-infozsources_fallback.pyr	c�l��t�|��ttj|j
��yro)r:r1rUr�r	r<r=s �rr1zEggInfoPkgSourcesFallback.setUpQs!���
��
���-�3�3�D�M�M�Jr2rbrAs@rr�r�<s1���5��	*
� ��E�9��(K�Kr2r�c�2��eZdZUddiZeed<�fd�Z�xZS)�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
            r	c�l��t�|��ttj|j
��yro)r:r1rUr�r	r<r=s �rr1zEggInfoFile.setUpfs ���
��
���K�%�%�d�m�m�<r2rbrAs@rr�r�Vs#����"�
�E�9�
�=�=r2r�c�,�tt|�|�Sr)r�DALS)�contentrEs  r�<lambda>r�ms���d�7�m�T�1Jr2c�D�djd�t|�D��S)N�c3�&K�|]	}|�d����y�w)z,,
Nr6)�.0�names  r�	<genexpr>zbuild_record.<locals>.<genexpr>ts����E�-D�T�d�V�4�=�-D�s�)�join�record_names)�	file_defss r�build_recordr�ss��
�7�7�E�\�)�-D�E�E�Er2c�n�tj�}tj||�|jSr)r�	Recording�build�record)r��	recordings  rr�r�ws(�����!�I�	�K�K�	�9�%����r2c��eZdZd�Zy)�FileBuilderc�4�txs|jd�S)Nz'File system does not support non-ascii.)r�skipr/s r�unicode_filenamezFileBuilder.unicode_filename~s���R�d�i�i�(Q�R�Rr2N)r3r4r5r�r6r2rr�r�}s��Sr2r�c�H�tj|�j�S)zDedent and left-strip)�textwrap�dedent�lstrip)rs rr�r��s���?�?�3��&�&�(�(r2c��eZdZdZd�Zd�Zy)�ZipFixturesztest.test_importlib.datac���tj|j�j|�}|jj	tj
|��}|jjd�sJ|j��tjjdt|��|jjtjjd�y)N�exampler)rr	�root�joinpathr;r
r��
startswithr!rE�insertr�callback�pop)r0�filename�pkg_file�files    r�_fixture_on_pathzZipFixtures._fixture_on_path�s����?�?�4�9�9�-�6�6�x�@���~�~�+�+�I�,=�,=�h�,G�H���y�y�#�#�I�.�9��	�	�9�.�������3�t�9�%�����������a�0r2c��tj�|_|j|jj�yr)r*r+rr-r.r/s rr1zZipFixtures.setUp�s(��#�-�-�/���������,�,�-r2N)r3r4r5r�r�r1r6r2rr�r��s��%�D�1�.r2r�c����fd�}|S)z,Run test method with a series of parameters.c�F���tj����fd��}|S)Nc�t���D]&}|jdi|��5�|fi|��ddd��(y#1swY�3xYw)Nr6)�subTest)r0�args�args_set�funcs  ��r�_innerz-parameterize.<locals>.wrapper.<locals>._inner�s:��� ��!�T�\�\�)�D�)���&��&�*�)�!�)�)�s�
.�7	)�	functools�wraps)r�r�r�s` �r�wrapperzparameterize.<locals>.wrapper�s%���	����	�	'�
�	'�
�
r2r6)r�r�s` r�parameterizer��s�����Nr2)5rr!rXrrr
r�r�r*�test.support.os_helperr�test.supportrr�rr�	importlibr�getattr�ImportError�AttributeError�importlib_resourcesrJrrrr&r(r8rCrLr_rdrgrjrrryr|r�r��create�registryrr�registerr�rUr�r�r�r�r�r�r6r2r�<module>r�s���	�
��
������.�&���,�#��I�w���I�y�!�
���������������������%��%�-�-�?�h�?�F��F�'*�)�W�'*�T=��G�=�C�y�'�C�*6��6�%<��G�%<�P R�y�'� R�F#Y�i��#Y�LQ�i��Q�<K�	�7�K�4=�)�W�=�,
�|�|���S�!�������c�J�K��k�k��F��S�S�
)�
��
.�
.��
.� ��C	�^�$�,�+�,�s�F"�"F1�0F1

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists