Sindbad~EG File Manager

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

�

SԚg��	�N�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddl
mZmZ	ddlmZeed��eed��n#eef$rddlZYnwxYwejd���Zejd	���Zejd
���Zejd���ZGd�d
��ZGd�de��ZGd�de��ZeeeeeeeeefeffeffZGd�dee��Z Gd�dee��Z!Gd�dee��Z"Gd�de��Z#Gd�dee��Z$Gd�dee��Z%ej&��fd�Z'Gd�d ��Z(d!�Z)Gd"�d#��Z*e��Gd$�d%����Z+d&�Z,dS)'�N)�FS_NONASCII)�
requires_zlib)�Dict�Union)�	resources�files�as_filec#�K�tj��}	tj|��V�t	j|��dS#t	j|��wxYw�N)�tempfile�mkdtemp�pathlib�Path�shutil�rmtree)�tmpdirs �9/usr/local/lib/python3.11/test/test_importlib/fixtures.py�tempdirrs[����
�
�
�
�F���l�6�"�"�"�"�"��
�f��������
�f�������s�A�Ac#�K�tj��}	dV�tj|��dS#tj|��wxYwr)�os�getcwd�chdir)�origs r�save_cwdr!sB����
�9�;�;�D��
����
������������������s	�1�Ac#��K�t��5}t��5tjt	|����|V�ddd��n#1swxYwYddd��dS#1swxYwYdSr)rrrr�str)�tmps r�tempdir_as_cwdr*s�����	����c�
�Z�Z�	�	��H�S��X�X�����I�I�I�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	���������������������s4�A*�&A�A*�A	�A*�A	�A*�*A.�1A.c#��K�tj�|��	dV�tj�|��dS#tj�|��wxYwr)�sys�	meta_path�append�remove)�finders r�install_finderr%2sb�����M���� � � �%�
�����
���V�$�$�$�$�$���
���V�$�$�$�$���s�A�!A)c��eZdZd�ZdS)�Fixturesc�t�tj��|_|�|jj��dSr)�
contextlib�	ExitStack�fixtures�
addCleanup�close��selfs r�setUpzFixtures.setUp<s/��"�,�.�.��
�����
�+�,�,�,�,�,�N)�__name__�
__module__�__qualname__r0�r1rr'r';s#������-�-�-�-�-r1r'c���eZdZ�fd�Z�xZS)�SiteDirc���t�����|j�t	����|_dSr)�superr0r+�
enter_contextr�site_dir�r/�	__class__s �rr0z
SiteDir.setUpBs3���
���
�
�����
�3�3�G�I�I�>�>��
�
�
r1�r2r3r4r0�
__classcell__�r=s@rr7r7As8�������?�?�?�?�?�?�?�?�?r1r7c�N��eZdZeejd�����Z�fd�Z�xZS)�	OnSysPathc#�K�t|��gtjdd�<	dV�tj�t|����dS#tj�t|����wxYw)Nr)rr �pathr#)�dirs r�add_sys_pathzOnSysPath.add_sys_pathHsm�����C���z����!���	&��E�E�E��H�O�O�C��H�H�%�%�%�%�%��C�H�O�O�C��H�H�%�%�%�%���s�A�.Bc���t�����|j�|�|j����dSr)r9r0r+r:rFr;r<s �rr0zOnSysPath.setUpQs@���
���
�
�����
�#�#�D�$5�$5�d�m�$D�$D�E�E�E�E�Er1)	r2r3r4�staticmethodr)�contextmanagerrFr0r?r@s@rrBrBGsh����������&�&����\�&�F�F�F�F�F�F�F�F�Fr1rBc�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.pyrc���t�����ttj|j��dSr�r9r0�build_filesrKrr;r<s �rr0zDistInfoPkg.setUpv�/���
���
�
�����K�%�t�}�5�5�5�5�5r1c���tj|jdz��tjt
j��}|d}|d���|d<t||j��dS)z=
        Rewrite metadata with everything uppercase.
        rPrLN)	rrr;�copy�deepcopyrKr�upperrT)r/r�infos   r�make_uppercasezDistInfoPkg.make_uppercasezsl��	�
�d�m�&D�D�E�E�E��
�k�/�0�0���3�4���
�+�1�1�3�3��Z���E�4�=�)�)�)�)�)r1)	r2r3r4r�FilesDef�__annotations__r0r[r?r@s@rrKrK[s���������
�/�!�)
�)
�&�)��E�8����46�6�6�6�6�*�*�*�*�*�*�*r1rKc�6��eZdZUdddiiZeed<�fd�Z�xZS)�DistInfoPkgWithDotzpkg_dot-1.0.0.dist-inforL�N
                Name: pkg.dot
                Version: 1.0.0
                rc���t�����ttj|j��dSr)r9r0rTr_rr;r<s �rr0zDistInfoPkgWithDot.setUp�s0���
���
�
�����&�,�d�m�<�<�<�<�<r1�r2r3r4rr\r]r0r?r@s@rr_r_�sb��������!���$
��E�8����=�=�=�=�=�=�=�=�=r1r_c�<��eZdZUddiddid�Zeed<�fd�Z�xZS)�DistInfoPkgWithDotLegacyrLr`zN
                Name: pkg.lot
                Version: 1.0.0
                )zpkg.dot-1.0.0.dist-infozpkg.lot.egg-inforc���t�����ttj|j��dSr)r9r0rTrdrr;r<s �rr0zDistInfoPkgWithDotLegacy.setUp�s0���
���
�
�����,�2�D�M�B�B�B�B�Br1rbr@s@rrdrd�s~��������
��$
�
��
�
�
�E�8�
�
�
�C�C�C�C�C�C�C�C�Cr1rdc���eZdZ�fd�Z�xZS)�DistInfoPkgOffPathc���t�����ttj|j��dSrrSr<s �rr0zDistInfoPkgOffPath.setUp�rUr1r>r@s@rrgrg�s8�������6�6�6�6�6�6�6�6�6r1rgc�@��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
)zPKG-INFOzSOURCES.txtrNzrequires.txtz
top_level.txtrO)zegginfo_pkg.egg-inforQrc���t�����ttj|j���dS�N��prefix)r9r0rTrjrr;r<s �rr0zEggInfoPkg.setUp�s2���
���
�
�����J�$�T�]�;�;�;�;�;�;r1rbr@s@rrjrj�s���������
��!��
%�3!
�!
�6�9 � �E�8� � � �D<�<�<�<�<�<�<�<�<r1rjc�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
            rc���t�����ttj|j���dSrl)r9r0rTrprr;r<s �rr0zEggInfoFile.setUp�s2���
���
�
�����K�%�d�m�<�<�<�<�<�<r1rbr@s@rrprp�sZ���������"�
�E�8�
�
�
�=�=�=�=�=�=�=�=�=r1rpc��|���D]�\}}||z}t|t��r&|���t	||����Et|t
��rC|�d��5}|�|��ddd��n#1swxYwY��|�dd���5}|�t|����ddd��n#1swxYwY��dS)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",
     }
    }
    rm�wbN�wzutf-8)�encoding)	�items�
isinstance�dict�mkdirrT�bytes�open�write�DALS)�	file_defsrn�name�contents�	full_name�fs      rrTrT�sx��($�/�/�+�+�,�,���h��T�M�	��h��%�%�		,��O�O�������3�3�3�3�3��(�E�*�*�
,��^�^�D�)�)�&�Q��G�G�H�%�%�%�&�&�&�&�&�&�&�&�&�&�&����&�&�&�&���^�^�C�'�^�:�:�,�a��G�G�D��N�N�+�+�+�,�,�,�,�,�,�,�,�,�,�,����,�,�,�,��,�,s$�B&�&B*	�-B*	�	#C8�8C<	�?C<	c��eZdZd�ZdS)�FileBuilderc�:�tp|�d��S)Nz'File system does not support non-ascii.)r�skipr.s r�unicode_filenamezFileBuilder.unicode_filenames���R�d�i�i�(Q�R�R�Rr1N)r2r3r4r�r5r1rr�r�s(������S�S�S�S�Sr1r�c�N�tj|�����S)zDedent and left-strip)�textwrap�dedent�lstrip)rs rr}r}s���?�3���&�&�(�(�(r1c��eZdZd�ZdS)�
NullFinderc��dSrr5)r/rs  r�find_modulezNullFinder.find_modules���r1N)r2r3r4r�r5r1rr�r�s#������
�
�
�
�
r1r�c��eZdZdZd�Zd�ZdS)�ZipFixturesztest.test_importlib.datac��tj|j���|��}|j�tj|����}|j�d��sJ|j���tj	�
dt|����|j�tj	j
d��dS)N�exampler)rr�root�joinpathr:r	r�
startswithr rD�insertr�callback�pop)r/�filename�pkg_file�files    r�_fixture_on_pathzZipFixtures._fixture_on_path!s����?�4�9�-�-�6�6�x�@�@���~�+�+�I�,=�h�,G�,G�H�H���y�#�#�I�.�.�9�9��	�9�9�.������3�t�9�9�%�%�%��������a�0�0�0�0�0r1c�t�tj��|_|�|jj��dSr)r)r*rr,r-r.s rr0zZipFixtures.setUp(s/��#�-�/�/��������,�-�-�-�-�-r1N)r2r3r4r�r�r0r5r1rr�r�s7������%�D�1�1�1�.�.�.�.�.r1r�c����fd�}|S)z,Run test method with a series of parameters.c�J���tj�����fd���}|S)Nc�n���D]0}|jdi|��5�|fi|��ddd��n#1swxYwY�1dS)Nr5)�subTest)r/�args�args_set�funcs  ��r�_innerz-parameterize.<locals>.wrapper.<locals>._inner2s���� �
'�
'��!�T�\�)�)�D�)�)�'�'��D��&�&��&�&�&�'�'�'�'�'�'�'�'�'�'�'����'�'�'�'��
'�
's�
)�-	�-	)�	functools�wraps)r�r�r�s` �r�wrapperzparameterize.<locals>.wrapper1s>����	���	�	�	'�	'�	'�	'�	'�
�	�	'�
�
r1r5)r�r�s` r�parameterizer�.s#���������Nr1)-rr rWrrrr�r�r)�test.support.os_helperr�test.supportr�typingrr�	importlibr�getattr�ImportError�AttributeError�importlib_resourcesrIrrrr%r'r7rBrr\rKr_rdrgrjrprrTr�r}r�r�r�r5r1r�<module>r�s+��	�	�	�	�
�
�
�
�����
�
�
�
���������������������.�.�.�.�.�.�&�&�&�&�&�&���������,�#�#�#�#�#�#��G�I�w�����G�I�y�!�!�!�!���^�$�,�,�,�+�+�+�+�+�+�,���������������������������%�%���%�-�-�-�-�-�-�-�-�?�?�?�?�?�h�?�?�?�F�F�F�F�F��F�F�F�"��U�4��U�4��S��>�3�+>�%?� ?�@�#�E�F�F�G��'*�'*�'*�'*�'*�)�W�'*�'*�'*�T=�=�=�=�=��G�=�=�=�C�C�C�C�C�y�'�C�C�C�*6�6�6�6�6��6�6�6�%<�%<�%<�%<�%<��G�%<�%<�%<�P=�=�=�=�=�)�W�=�=�=�*#/�'�,�.�.�,�,�,�,�DS�S�S�S�S�S�S�S�
)�)�)�

�
�
�
�
�
�
�
�
����
.�
.�
.�
.�
.�
.�
.���
.� ����s�A�A'�&A'

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