Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_zipimport.cpython-312.opt-1.pyc

�

'Μg����ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ddlmZddlmZmZmZmZddlZddlZddlZddlZddlZddlmZmZmZ	ddlZdZe edd	�Z!d
Z"d�Z#d�Z$ej�Z%e#e!e%e&e��Z'd
Z(dZ)dZ*dZ+dZ,dZ-ej\j_d�Z0ej\j_d�Z1ejdjge(dz�Z4dZ5Gd�dejl�Z7Gd�de7�Z8ejr�Gd�de8��Z:Gd�dejl�Z;d�Z<e=d k(rej|�yy#e$rdZY��wxYw)!�N)�support)�
import_helper)�	os_helper)�ZipFile�ZipInfo�
ZIP_STORED�ZIP_DEFLATED)�
extract_tb�
extract_stack�print_tbzHdef get_name():
    return __name__
def get_file():
    return __file__
�<???>�execz def do_raise(): raise TypeError
c��tj|�}tjjtjddt|�dz|dz�z|z}|S)Nz<iLLr���)�marshal�dumps�	importlib�util�MAGIC_NUMBER�struct�pack�int)�co�mtime�size�data�pycs     �0/usr/local/lib/python3.12/test/test_zipimport.py�make_pycr&sY���=�=���D��>�>�&�&����F�A���J��,�d�[�.@�	B�B�DH�I�C��J�c�B�|jtjd�S)N�.)�replace�os�sep)�paths r�module_path_to_dotted_namer'-s���<�<�����$�$r �
ziptestmodule�ziptestmodule2�ziptestmodule3�ziptestpackage�ziptestpackage2�ziptestpackage3�	junk95142z
junk95142.zip�.py�.pycc��eZdZd�Zd�Zy)�ImportHooksBaseTestCasec��tjdd|_tjdd|_tjdd|_tjj�t
j�|_y�N)	�sysr&�	meta_path�
path_hooks�path_importer_cache�clearr�
modules_setup�modules_before��selfs r�setUpzImportHooksBaseTestCase.setUpCsT���H�H�Q�K��	����q�)����.�.��+������%�%�'�+�9�9�;��r c�&�|jtjdd|jtjdd|jtjddtjj�t
j|j�yr4)	r&r5r6r7r8r9r�modules_cleanupr;r<s r�tearDownz ImportHooksBaseTestCase.tearDownJs]���i�i�������>�>��
�
�a�� �O�O����q�����%�%�'��%�%�t�':�':�;r N)�__name__�
__module__�__qualname__r>rA�r rr2r2As��<�<r r2c��eZdZeZd�Zefd�Zefddddd�d�Z	ddd�d�Z
dd	�d
�Zd�Zd�Z
d
�Zd�Zd�Zej$j'dd�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/ej`e1jddud.�d/��Z3d0�Z4d1�Z5d2�Z6d3�Z7y)4�UncompressedZipImportTestCasec��tj�tjj	�t
j
|�yr4)�	linecache�
clearcache�	zipimport�_zip_directory_cacher9r2r>r<s rr>z#UncompressedZipImportTestCase.setUpVs0��	�����&�&�,�,�.��%�%�d�+r c��|jtj|�|j�D�]\}}t	|t
�r|\}}t
jj|g|jd����}|dtjk(r6tjj|�r��t
j|���tjj|�}tjj|�st
j|�t|d�5}|j|�ddd���y#1swY��xYw)N�/����wb)�
addCleanupr�rmtree�items�
isinstance�tupler$r&�join�splitr%�isdir�makedirs�dirname�open�write)	r=�files�dirName�namerrr&�dname�fps	         r�makeTreez&UncompressedZipImportTestCase.makeTree]s���	
���	�(�(�'�2��+�+�-�J�D�$��$��&�"���t��7�7�<�<��:�$�*�*�S�/�:�D��B�x�2�6�6�!��w�w�}�}�T�*��K�K��%�������-���w�w�}�}�U�+��K�K��&��$��%���H�H�T�N�&�%�(�&�%�s�'E�E	N�)�comment�file_comment�stuff�prefixc���|jtj|�t|d|j��5}|j||||��|�||_ddd�|�]t|d�5}	|	j�}
ddd�t|d�5}	|	j|�|	j
�ddd�yy#1swY�ixYw#1swY�NxYw#1swYyxYw)N�w��compression�rerg�rbrP)
rQr�unlinkrrk�writeZiprdr[�readr\)r=r]�zipNamerdrerfrg�kw�z�frs           r�makeZipz%UncompressedZipImportTestCase.makeZipps���
	
���	�(�(�'�2�
�W�c�t�/?�/?�
@�A��M�M�!�U��f�M�M��"�#��	�A�
���g�t�$���v�v�x��%��g�t�$�����������
�%�$�	�A�
@��%�$��$�$�s#�C�.C�#C�C	�C�C!rlc�~�|j�D]�\}}t|t�r|\}}nt}|j	t
jd�}t||ztj|��}|j|_|�||_|�d|_
|j|���|j||���y)NrNr)rSrTrU�NOWr#r$r%r�time�	localtimerk�
compress_typerd�CRC�mkdir�writestr)	r=rsr]rergr_rr�zinfos	         rroz&UncompressedZipImportTestCase.writeZip�s����+�+�-�J�D�$��$��&�"���t����<�<�����,�D��F�T�M�4�>�>�%�+@�A�E�"&�"2�"2�E���'� ,��
��|���	�������
�
�5�$�'�(r ��callc���d|vrd|d<|d}|j|fi|��tjjtg|jd�dd���}tjjd|�tjdj|��}|�||�|rD|j�}	|j|	tjj|g|���|z�yy)Nrgzpre/fix/rNrOrr")rur$r&rV�TEMP_ZIPrWr5�insertr�
import_module�get_file�assertEqual)
r=�expected_extr]r��modulesrrrg�zip_path�mod�files
          r�doTestz$UncompressedZipImportTestCase.doTest�s����2��%�B�x�L��H�������U�!�b�!��7�7�<�<��B�6�<�<��+<�S�b�+A�B��������8�$��%�%�c�h�h�w�&7�8������I���<�<�>�D����T�2�7�7�<�<��$+�")�$+�-9�$:�
;�r c�|�dtjvr|jd�dtjvrtjd=dti}	|jd|d�|jtk7r|jd�yy#t$r)|jtk7r|jd�YyYywxYw)N�zlibzzlib is a builtin modulezzlib.pyr/z"expected test to raise ImportErrorz&expected test to not raise ImportError)r5�builtin_module_names�skipTestr��test_srcr�rkr�fail�ImportErrorr	�r=r]s  r�
testAFakeZlibz+UncompressedZipImportTestCase.testAFakeZlib�s���&�S�-�-�-��M�M�4�5��S�[�[� ����F�#��H�%��	@��K�K��u�f�-�
���:�-��	�	�>�?�.��	�	D����<�/��	�	�B�C�0�	D�s�B	�	-B;�:B;c�P�tdzti}|jd|t�y�Nr/��TESTMODr�r�r�s  r�testPyz$UncompressedZipImportTestCase.testPy�s ���5��(�+�����E�5�'�*r c�`�ttzti}|jt|t�yr4)r��pyc_ext�test_pycr�r�s  r�testPycz%UncompressedZipImportTestCase.testPyc�s!���7�"�H�-�����G�U�G�,r c�z�tdztttzti}|j	t|t�yr�)r�r�r�r�r�r�s  r�testBothz&UncompressedZipImportTestCase.testBoth�s,���5��(��7�"�H�.�����G�U�G�,r c�"��d}tjj|�}tjj	t|dd�|d�}tdztdftdztdz
|fi}�fd	�}�jd|t|�
�y)N�
state = 'old'�???rFr/�
state = 'new'r0�c�>���j|jd�y)N�old�r��state�r�r=s �r�checkzFUncompressedZipImportTestCase.testUncheckedHashBasedPyc.<locals>.check��������S�Y�Y��.r r�	rr�source_hash�_bootstrap_external�_code_to_hash_pyc�compiler�rwr��r=�sourcer��bytecoder]r�s`     r�testUncheckedHashBasedPycz7UncompressedZipImportTestCase.testUncheckedHashBasedPyc�s����!���n�n�0�0��8���0�0�B�B��F�E�6�*���
��
�5��3��"8��6�!�C�"�H�h�#7�9��	/����D�%��u��5r z_imp.check_hash_based_pycs�alwaysc�"��d}tjj|�}tjj	t|dd�|d�}tdztdftdztdz
|fi}�fd	�}�jd|t|�
�y)Nr�r�rFr/r�r0r�c�>���j|jd�y)N�newr�r�s �rr�zOUncompressedZipImportTestCase.test_checked_hash_based_change_pyc.<locals>.check�r�r rr�r�s`     r�"test_checked_hash_based_change_pycz@UncompressedZipImportTestCase.test_checked_hash_based_change_pyc�s����!���n�n�0�0��8���0�0�B�B��F�E�6�*���
��
�5��3��"8��6�!�C�"�H�h�#7�9��	/����D�%��u��5r c�H�tdzdi}|jd|t�y)Nr/rc)r�r�r�s  r�testEmptyPyz)UncompressedZipImportTestCase.testEmptyPy�s ���5��"�%�����D�%��)r c��tt�}|dxxdzcc<tdztttz|i}|jd|t�y)Nr�r/��	bytearrayr�r�r�r�r�)r=�badmagic_pycr]s   r�testBadMagicz*UncompressedZipImportTestCase.testBadMagic�sD�� ��*���Q��4����5��(��7�"�L�2�����E�5�'�*r c�x�tt�}|dxxdzcc<ttz|i}	|j	d|t�|jd�y#tj$rP}|j|jt�|jd|jj�Yd}~yd}~wwxYw)Nrr�r/zThis should not be reachedzmagic number)
r�r�r�r�r�r�rK�ZipImportError�assertIsInstance�	__cause__r��assertIn�msg)r=r�r]�excs    r�
testBadMagic2z+UncompressedZipImportTestCase.testBadMagic2s��� ��*���Q��4����7�"�L�1��	=��K�K��u�g�.��I�I�2�3���'�'�	=��!�!�#�-�-��=��M�M�.�#�-�-�*;�*;�<�<��	=�s�(A�B9�)AB4�4B9c��tt�}|dxxdzcc<tdztttz|i}|jd|t�y)N��r/r�)r=�badtime_pycr]s   r�testBadMTimez*UncompressedZipImportTestCase.testBadMTimesF����)��	�B��4����5��(��7�"�K�1�����E�5�'�*r c��ttdtt��}tdzttt
z|i}|j
d|t�y)Nrr/)r�test_co�lenr�r�r�r�)r=�twenty_thirty_eight_pycr]s   r�
test2038MTimez+UncompressedZipImportTestCase.test2038MTimesB��#+�7�I�s�8�}�"M���5��(��7�"�$;�=�����E�5�'�*r c��ttjz}|dztzt|t
ztzti}|j
t|tt
�y�N�__init__)�TESTPACKr$r%r�r�r�r�)r=�packdirr]s   r�testPackagez)UncompressedZipImportTestCase.testPackagesG���R�V�V�#���:�%��/���7�"�W�,�h�8�����G�U�H�g�6r c��ttjz}|tztjz}|dztzt
|dztzt
|tztzt
i}|jt|ttt�yr�)r�r$r%�	TESTPACK2r�r�r�r��r=r��packdir2r]s    r�testSubPackagez,UncompressedZipImportTestCase.testSubPackage#so���R�V�V�#���Y�&����/���:�%��/���J�&��0�(��G�#�g�-�x�9��	
���G�U�H�i��Ar c���ttjz}|tztjz}|d|d|tzt
zti}|jt
|ttt�yr4)r�r$r%r�r�r�r�r�r�s    r�testSubNamespacePackagez5UncompressedZipImportTestCase.testSubNamespacePackage-s[���R�V�V�#���Y�&����/���$��4��G�#�g�-�x�9��	
���G�U�H�i��Ar c�~�ttjz}|tztjz}|tztjz}|d|t
ztzt|d|d|t
ztzt|tztzt|t
ztzti}|d|tztzt|d|tztzt|t
ztzti}tjjd�}|j||�t}|j||�tjj!d|�tjj!d|�t#j$t�}|j'dt)|j*��|j*\}	}
|j'tjj-t�|	j/tj�d�|j'd|
j/tj�d�t#j$|j1tjd�dd�}|j'dt)|j*��t3|j*�dj/dtjz�d}|j'|dd|�t#j$dj5tt
f��}|j'd|j6j/tj�d�t#j$dj5ttf��}|j'tjj-t�|j6j/tj�d�dj5ttf�}t#j$|�}|j'dt)|j*��|j*\}	}
|j'tjj-t�|	j/tj�d�|j'd|
j/tj�d�t#j$dj5|t
f��}|j'tjj-t�|j6j/tj�d	�t#j$dj5|tf��}|j'tjj-t�|j6j/tj�d	�t#j$dj5|tf��}|j'd|j6j/tj�d	�y)
N�	path1.ziprr����r"rO�������)r�r$r%r��	TESTPACK3r�r�r��TESTMOD3�TESTMOD2r&�abspathru�TEMP_DIRrbr5r�rr�r�r��__path__�basenamerWr#�listrV�__file__)
r=r�r��packdir3�files1�files2�zip1�zip2r��p1�p2�mpath�subpkgs
             r�testMixedNamespacePackagez7UncompressedZipImportTestCase.testMixedNamespacePackage8sq���R�V�V�#���Y�&����/���i�'�"�&�&�0���4��G�#�g�-�x��D��D��W�$�w�.���X�%��/���W�$�w�.��
:���4��H�$�w�.���D��X�%��/���W�$�w�.��	:���w�w���{�+�����V�T�"����
�
�f�d�#�	������4� �������4� ��%�%�h�/��
	
����C����-�.������B�������)�)�(�3�R�X�X�b�f�f�5E�b�5I�J�����b�h�h�r�v�v�&6�r�&:�;��%�%�h�&6�&6�r�v�v�s�&C�C�R�&H�I������C����-�.��S�\�\�"�1�%�+�+�K�"�&�&�,@�A�!�D������#�2���.��%�%�c�h�h��'�/B�&C�D������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h��(�/C�&D�E��������)�)�(�3����+�+�B�F�F�3�B�7�	9����8�Y�/�0���%�%�f�-������C����-�.������B�������)�)�(�3�R�X�X�b�f�f�5E�b�5I�J�����b�h�h�r�v�v�&6�r�&:�;��%�%�c�h�h���/@�&A�B��������)�)�(�3����+�+�B�F�F�3�B�7�	9��%�%�c�h�h���/A�&B�C��������)�)�(�3����+�+�B�F�F�3�B�7�	9��%�%�c�h�h���/A�&B�C������c�l�l�&8�&8����&@��&D�Er c�f�ttjz}|tztjz}|tztjz}|d|t
ztzt|d|d|t
ztzt|tztzt|t
ztzti}tjjd�}|j||�|d|tztzt|d|tztzt|t
ztzti}tjjd�}|j||�tjjd|�tjjd|�tj t�}|j#dt%|j&��|j&\}	}
|j#d|	j)tj�d�|j#d|
j)tj�d�tj |j+tjd�dd�}|j#dt%|j&��t-|j&�dj)dtjz�d}|j#|dd|�tj dj/tt
f��}|j#d|j0j)tj�d	�tj dj/ttf��}|j#d|j0j)tj�d	�dj/ttf�}tj |�}|j#dt%|j&��|j&\}	}
|j#d|	j)tj�d	�|j#d|
j)tj�d	�tj dj/|t
f��}|j#d|j0j)tj�d
�tj dj/|tf��}|j#d|j0j)tj�d
�tj dj/|tf��}|j#d|j0j)tj�d
�y)Nr�z	path2.ziprr�r�r"rOr�r�r�)r�r$r%r�r�r�r�r�r�r&r�rur�r5r�rr�r�r�r�rWr#r�rVr�)
r=r�r�r�r�r�r�r�r�r�r�r�r�s
             r�testNamespacePackagez2UncompressedZipImportTestCase.testNamespacePackage�s*���R�V�V�#���Y�&����/���i�'�"�&�&�0���4��G�#�g�-�x��D��D��W�$�w�.���X�%��/���W�$�w�.��
:���w�w���{�+�����V�T�"��4��H�$�w�.���D��X�%��/���W�$�w�.��	:��
�w�w���{�+�����V�T�"�	������4� �������4� ��%�%�h�/��
	
����C����-�.������B�����b�h�h�r�v�v�&6�r�&:�;�����b�h�h�r�v�v�&6�r�&:�;��%�%�h�&6�&6�r�v�v�s�&C�C�R�&H�I������C����-�.��S�\�\�"�1�%�+�+�K�"�&�&�,@�A�!�D������#�2���.��%�%�c�h�h��'�/B�&C�D������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h��(�/C�&D�E������c�l�l�&8�&8����&@��&D�E����8�Y�/�0���%�%�f�-������C����-�.������B�����b�h�h�r�v�v�&6�r�&:�;�����b�h�h�r�v�v�&6�r�&:�;��%�%�c�h�h���/@�&A�B������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h���/A�&B�C������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h���/A�&B�C������c�l�l�&8�&8����&@��&D�Er c�|
�ttjz}|tztjz}|dztzt
|dztzt
|tztzt
dtzt
i}|j|d��tjt�}|j|jt�|j|jt��tj �5tj"dt$�|j't�}|j|j)t�|j*�ddd�|j-d�}|j/|�|j1|j2tj�|j5|j2jd��t6j8j;|�}|j2j=|�|j|j2j)d�|j*�|j-t�}t6j8j;|�}|j2j=|�|j|j)t�|j*�t7j>t�j@d}tjBjEtt�}	|j||	�|j5|j|dz��|j|j|tz��|j5|j|tz��|tz}
tG|
�}t7j>|�}|j|tHjJv�|jM|jOt��|jM|jO|
��|j|j)|
�|j*�|jPj2}|jM|jO|��|j|j)|�|j*�tjttjztz�}
|j|
jt�|j|
jRttjz�y#1swY���xYw)Nr��spam�spam�re�ignorer)*r�r$r%r�r�r�r�rurK�zipimporterr�r��archive�
assertTrue�
is_package�warnings�catch_warnings�simplefilter�DeprecationWarning�load_module�get_filenamer��	find_spec�assertIsNotNoner��loader�assertFalserr�module_from_spec�exec_moduler�r�r&rVr'r5r��assertIsNone�
get_source�__spec__rg)r=r�r�r]�zir��spec�exec_mod�existing_pack_path�expected_path_path�mod_path�mod_namer�zi2s              r�testZipImporterMethodsz4UncompressedZipImportTestCase.testZipImporterMethods�s����R�V�V�#���Y�&����/���:�%��/���J�&��0�(��G�#�g�-�x��'�!�8�-��	
���U���1�
�
"�
"�8�
,��������X�.�����
�
�h�/�0��
$�
$�
&��!�!�(�,>�?��.�.��*�C����R�_�_�X�6����E�	'��|�|�F�#�����T�"����d�k�k�9�+@�+@�A�������/�/��7�8��>�>�2�2�4�8��������)�������1�1�&�9�8�;L�;L�M��|�|�H�%���n�n�-�-�d�3��������$��������2�C�L�L�A�&�4�4�X�>�G�G��J���W�W�\�\�(�H�=�����+�-?�@�������w��';�<�=�����
�
�g�	�&9�:�;�������x�'�'9�:�;��g�%��-�h�7���%�%�h�/������C�K�K�/�0����"�-�-��1�2����"�-�-��1�2��������2�C�L�L�A����$�$�����&�+�+�H�5�6�����,�,�X�6����E��#�#�H�r�v�v�$5��$@�A��������h�/�������X����%6�7�Y'�
&�s
�9AT1�1T;c�p�ttjz}|tztjz}|dztzt
|dztzt
|tztzt
dtzt
i}|j|d��tjt�}|j|jj�|j��|j�|j|jj�|j��dtzt
i}|j|�t!td|j"��5}|j%||d��ddd�|j�|j|jj�|j��|j'd�}|j)|�|j+|j,tj�tj.t�|j�|j1|j�|j3tj4j7|j8��|j3|j'd��y#1swY��;xYw)	Nr�r�r�r�spam2�arj�name_does_not_matter)r�r$r%r�r�r�r�rurKrr�r��_files�keys�invalidate_caches�updaterrkrorr
r�r�removerrrL�getr)r=r�r�r]r�newfilersrs        r�testInvalidateCachesz2UncompressedZipImportTestCase.testInvalidateCaches
s����R�V�V�#���Y�&����/���:�%��/���J�&��0�(��G�#�g�-�x��'�!�8�-��	
���U���1�
�
"�
"�8�
,����������)�5�:�:�<�8�
������������)�5�:�:�<�8��W�$�h�/��
���W��
�X�s��0@�0@�
A�Q��M�M�!�W�7�M�;�B�	������������)�5�:�:�<�8��|�|�G�$�����T�"����d�k�k�9�+@�+@�A�
�	�	�(��
����������#����)�8�8�<�<�R�Z�Z�H�I����"�,�,�'=�>�?�B�
A�s�J+�+J5c�	�ttjz}|tztjz}|dztzt
|tztzt
i}|j|d��tjttjz|z�}|j|jt�|j|j|�|j|jt��t!j"�5t!j$dt&�|j)t�}|j|j+t�|j,�ddd�|j/t�}t0j2j5|�}|j6j9|�|j|j6j+t�|j,�|j;|jttjzdz��|j;|jttjztz��ttjz|ztz}tj|�}|j/t�}|j=|�|j?|j6tj�|j;|j6jt��t0j2j5|�}	|j6j9|	�|j|j6j+t�|	j,�ttjztz}
tA|
�}t1jB|�}|j|tDjFv�|jI|jKt��|jI|jK|
��|j|j+|
�|j,�|jL}|jI|jK|��|j|j+|�|j,�y#1swY��SxYw)Nr�seggsrr)'r�r$r%r�r�r�r�rurKrr�r�rrgrrrrrr	r
rr�rrrrrrrr
r�r'r�r5r�rr�
__loader__)
r=r�r�r]rr�r�pkg_pathr�load_modrrrs
             r�$testZipImporterMethodsInSubDirectoryzBUncompressedZipImportTestCase.testZipImporterMethodsInSubDirectory*sK���R�V�V�#���Y�&����/���J�&��0�(��G�#�g�-�x�9�����U���1�
�
"�
"�8�b�f�f�#4�w�#>�
?��������X�.�������G�,�����
�
�i�0�1�
�
$�
$�
&��!�!�(�,>�?��.�.��+�C����R�_�_�Y�7����F�'�
�|�|�I�&���n�n�-�-�d�3��������$�������1�1�)�<�c�l�l�K�������y�2�6�6�'9�J�'F�G�H�������y�2�6�6�'9�G�'C�D�E��b�f�f�$�w�.��:���#�#�H�-���}�}�W�%�����T�"����d�k�k�9�+@�+@�A�������/�/��8�9��>�>�2�2�4�8��������)�����K�K�$�$�W�-�x�/@�/@�	B��r�v�v�%��/��-�h�7���%�%�h�/������C�K�K�/�0����"�-�-�	�2�3����"�-�-��1�2��������2�C�L�L�A��������&�+�+�H�5�6�����,�,�X�6����E�K'�
&�s
�AR<�<Sc��|jtjt�t	td�5}|j
|_d}t
d�td�D��}|j||�ddd�tjt�}|j|j��|jdt|��y#1swY�_xYw)Nriztestdata.datc3� K�|]}|���y�wr4rE)�.0�xs  r�	<genexpr>z<UncompressedZipImportTestCase.testGetData.<locals>.<genexpr>bs����/�J�q��J�s��zzipimporter object)rQrrnr�rrk�bytes�ranger}rKrr��get_datar��repr)r=rsr_rrs     r�testGetDataz)UncompressedZipImportTestCase.testGetData]s������	�(�(�(�3�
�X�s�
#�q� �,�,�A�M�!�D��/�E�#�J�/�/�D�
�J�J�t�T�"�	$��
"�
"�8�
,������r�{�{�4�0�1��
�
�*�D��H�5�$�
#�s�AC�Cc��d}tt|dd�tt|��}tt
z|ddi}|j
t
|td��y)Nz�if 1:  # indent hack
        def get_file():
            return __file__
        if __loader__.get_data("some.data") != b"some data":
            raise AssertionError("bad data")
r
rz	some.dataz	some datarc)rg)rr�rwr�r�r�r�)r=�srcrr]s    r�testImporterAttrz.UncompressedZipImportTestCase.testImporterAttrisP��2��
�w�s�G�V�4�c�3�s�8�D���7�"�C��k�+�����G�U�G�B��7r c�@�d}tdz|i}|j|�tjj	dt
�t
jt�}|j|jd�d�	|j|jd�d�y)Nz[if 1:  # indent hack
        def test(val):
            assert(val)
            return val
r/rr�)r�rur5r&r�r�rr�r��test�assertRaises�AssertionError)r=r;r]r�s    r�testDefaultOptimizationLevelz:UncompressedZipImportTestCase.testDefaultOptimizationLevelts|�����5��#�&�����U��������8�$��%�%�g�.��������!��a�(��
���S�X�X�a�[�!�,r c�T�tdzti}|jd|td��y)Nr/s6Some StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome Stuff)rfr�r�s  r�testImport_WithStuffz2UncompressedZipImportTestCase.testImport_WithStuff�s,���5��(�+�����E�5�'�*�	�	,r c�V�|jtj|�t�yr4)r��inspect�	getsourcer�)r=�modules  r�assertModuleSourcez0UncompressedZipImportTestCase.assertModuleSource�s������*�*�6�2�H�=r c�h�tdzti}|jd|t|j��y�Nr/r)r�r�r�rHr�s  r�
testGetSourcez+UncompressedZipImportTestCase.testGetSource�s*���5��(�+�����E�5�'��0G�0G��Hr c���tttdd�tt	t��}t
dztt
tz|i}|jt|t
|j��y)Nr
rr/r)	rr�r�rwr�r�r�r�rH)r=rr]s   r�testGetCompiledSourcez3UncompressedZipImportTestCase.testGetCompiledSource�sQ���w�x��&�9�3��H�
�N���5��(��7�"�C�)�����G�U�G�$�2I�2I��Jr c�X�tdztddi}|jd|t|��y)Nr/�xyz.txtz>>> log.append(True)
rr�)r=�callbackr]s   r�
runDoctestz(UncompressedZipImportTestCase.runDoctest�s,���5��(��4�6�����E�5�'���9r c���g}tjdc}t_	tjd|dt���|t_|j	|dg�y#|t_wxYw�NrOT)�package�module_relative�globs)�doctest�master�testfile�localsr�)r=rG�log�
old_masters    r�
doDoctestFilez+UncompressedZipImportTestCase.doDoctestFile�s^����%,�^�^�T�"�
�G�N�	(�����6�4��h�
�
(�G�N�����d�V�$��(�G�N�s�!A � 
A-c�:�|j|j�yr4)rQr]r<s r�testDoctestFilez-UncompressedZipImportTestCase.testDoctestFile�s������*�*�+r c��g}tjd|dt���j�|j	|dg�yrS)rW�DocFileTestrZ�runr�)r=rGr[s   r�doDoctestSuitez,UncompressedZipImportTestCase.doDoctestSuite�s<��������v�t��(�	
��#�%�����d�V�$r c�:�|j|j�yr4)rQrcr<s r�testDoctestSuitez.UncompressedZipImportTestCase.testDoctestSuite�s������+�+�,r c�P�	|j�td��#t$r�}|jj}t|d�d\}}}}|j
|tj��t|jd�d\}}}}|j
|tj��tj�}t|d|�|j|j�j!t#j$�rdnd��Yd}~yd}~wwxYw)NzThis ought to be impossibler�rz$    def do_raise(): raise TypeError
z$                    ^^^^^^^^^^^^^^^
)�do_raiser@�	Exception�
__traceback__�tb_nextr
r��	raise_src�stripr�tb_frame�io�StringIOrr�getvalue�endswithr�has_no_debug_ranges)	r=rG�e�tbrt�lno�n�line�ss	         r�doTracebackz)UncompressedZipImportTestCase.doTraceback�s���	@��O�O��$!�!>�?�?��#�	����(�(�B�%�b�!�,�Q�/�L�A�c�!�D����T�9�?�?�#4�5�(����a�8��;�L�A�c�!�D����T�9�?�?�#4�5����
�A��R��A���O�O�A�J�J�L�1�1��1�1�3��7��
�
��	�s��	D%�C5D � D%c�h�tdzti}|jd|t|j��yrJ)r�rkr�ryr�s  r�
testTracebackz+UncompressedZipImportTestCase.testTraceback�s*���5��)�,�����D�%��t�/?�/?��@r zneed an unencodable filenamec�,�tjdz}|jtdzti|�tj|�jt�}tjj|�}|jj|�y�Nz.zipr/)
r�TESTFN_UNENCODABLErur�r�rKrrrrrrr)r=�filenamerr�s    r�testUnencodablez-UncompressedZipImportTestCase.testUnencodable�sl���/�/�&�8�����g��o�x�0�(�;��$�$�X�.�8�8��A���n�n�-�-�d�3��������$r c��tjdz}|jtdzti|�tj|�|jt�5tjtj|��ddd�|jt�5tjttj|���ddd�|jt�5tjttj|���ddd�y#1swY��xYw#1swY�exYw#1swYyxYwr})
r�TESTFNrur�r�rKrr?�	TypeErrorr$�fsencoder��
memoryview�r=rs  r�
testBytesPathz+UncompressedZipImportTestCase.testBytesPath�s����#�#�f�,�����g��o�x�0�(�;����h�'�
�
�
�y�
)��!�!�"�+�+�h�"7�8�*�
�
�
�y�
)��!�!�)�B�K�K��,A�"B�C�*�
�
�
�y�
)��!�!�*�R�[�[��-B�"C�D�*�
)�	*�
)��
)�
)��
)�
)�s$�)D-�#2D9�22E�-D6�9E�Ec�T�tdzti}|jd|td��y)Nr/scomment�rdr�r�s  r�testCommentz)UncompressedZipImportTestCase.testComment�s$���5��(�+�����E�5�'�:��>r c�V�tdzti}|jd|tdd��y)Nr/s@cruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftshi)rfrdr�r�s  r�testBeginningCruftAndCommentz:UncompressedZipImportTestCase.testBeginningCruftAndComment�s&���5��(�+�����E�5�'����Nr c�Z�tdzti}|jd|tddz��y)Nr/�ci��r�r�r�s  r�testLargestPossibleCommentz8UncompressedZipImportTestCase.testLargestPossibleComment�s)���5��(�+�����E�5�'�4�=�3I��Jr )8rBrCrDrrkr>r�rbr�ruror�r�r�r�r�r��unittest�mock�patchr�r�r�r�r�r�r�r�r�r�r�rr)r.r9r<rArCrHrKrMrQr]r_rcreryr{�skipIfrr~r�r�r�r�r�rEr rrGrGRsd���K�,�'/�#�&&.���4�t�B��(26�b�(�$:>�;�&@�B+�-�-�
6��]�]���5�x�@�6�A�6�*�+�
=�+�+�7�B�	B�KF�ZGF�R:8�x@�@1F�f
6�	8�-� ,�>�I�K�:�

%�,�%�-�@�,A��X�_�_�Y�1�1�T�9�3�5�%�5�%�
E�?�O�Kr rGc��eZdZeZy)�CompressedZipImportTestCaseN)rBrCrDr	rkrEr rr�r��s���Kr r�c��eZdZd�Zd�Zd�Zd�Zd�Zd�Ze	jejd�d��Z
d	�Zd
�Zy)�BadFileZipImportTestCasec�b�|jtjtj|�yr4)r?rKr�rr�s  r�assertZipFailurez)BadFileZipImportTestCase.assertZipFailure�s#�����)�2�2�#�/�/��	;r c�&�|jd�y)N�AdfjdkFJKDFJjdklfjs�r�r<s r�
testNoFilez#BadFileZipImportTestCase.testNoFile�s�����3�4r c�&�|jd�y)Nrcr�r<s r�testEmptyFilenamez*BadFileZipImportTestCase.testEmptyFilenames�����b�!r c	�.�|jttjd�|jttjtd��|jttjtt
jt���y)N)�kwd)r?r�rKrr�r�r$r�r<s r�testBadArgsz$BadFileZipImportTestCase.testBadArgss`�����)�Y�%:�%:�D�A����)�Y�%:�%:�G���N����)�Y�%:�%:��r�{�{�7�3�4�	6r c�,�|jddz�y)N�Ai�r�r<s r�testFilenameTooLongz,BadFileZipImportTestCase.testFilenameTooLong	s�����c�E�k�*r c��tjt�tjt�|j	t�yr4)rrnr��create_empty_filer�r<s r�
testEmptyFilez&BadFileZipImportTestCase.testEmptyFiles,������!��#�#�G�,����g�&r zmode 000 not supported.c�$�tjt�tjttj
d�}	tj|�|jtj�5}tjt�ddd�tjtd�tjt�y#1swY�=xYw#tjtd�tjt�wxYw)Nri�)rrnr�r$r[�O_CREAT�closer?rKr�r�chmod)r=�fd�cms   r�testFileUnreadablez+BadFileZipImportTestCase.testFileUnreadables�������!�
�W�W�W�b�j�j�#�
.��		&��H�H�R�L��"�"�9�#;�#;�<���%�%�g�.�=�

�H�H�W�e�$����W�%�
=�<��

�H�H�W�e�$����W�%�s$�4C�8C�C�C�C�5Dc���tjt�ttd�}|j	d�|j�|j
t�y)N�w+�aaaaaaaaaaaaaaaaaaaaaa)rrnr�r[r\r�r�)r=ras  r�testNotZipFilez'BadFileZipImportTestCase.testNotZipFile s?������!�
�'�4�
 ��
�����
���
����g�&r c�@�tjt�ttd�}|j	tjdd��|j	d�|j�tjt�}	tj�5tjdt�|jt|j d�ddd�|jt|j"d�|jt|j$d�|jt|j&d�|jt|j(d�|jt|j*d�|jt|j,d�|jt|j.d�tj0}|j3|j%d��tj�5tjdt�|j||j d�ddd�|j||j*d�|jt4|j,d�|j||j.d�|j||j(d�tj6j9�y#1swY��xYw#1swY��xYw#tj6j9�wxYw)Nr�z=IiPK�aaaaaaaaaaaaaaaaaar�abc)rrnr�r[r\rrr�rKrrrrr	r?r�r
�find_modulerrr�get_coder7rr�r�OSErrorrLr9)r=rars�errors    r�_testBogusZipFilez*BadFileZipImportTestCase._testBogusZipFile(s������!�
�'�4�
 ��
������T�:�.�/�
�����
���
��!�!�'�*��	3��(�(�*��%�%�h�0B�C��!�!�)�Q�]�]�D�A�+�
���i�����=����i����d�;����i�����=����i����t�<����i����T�:����i����T�:����i����t�<��,�,�E����a�k�k�%�0�1��(�(�*��%�%�h�0B�C��!�!�%�����>�+�
���e�Q�Z�Z��7����g�q�z�z�5�9����e�Q�\�\�5�9����e�Q�\�\�5�9��*�*�0�0�2�-+�*��+�*��
�*�*�0�0�2�s>�
K=�<K$�D3K=�
8K1�BK=�$K.�)K=�1K:�6K=�= LN)rBrCrDr�r�r�r�r�r�r�r�r�is_wasir�r�r�rEr rr�r��sQ��;�5�"�6�+�'�
�X�_�_�W�_�_�&?�@�&�A�&�'�3r r�c�6�tjt�yr4)rrnr�rEr r�tearDownModuler�Js��
���W�r �__main__)?r5r$rr�importlib.utilrrxr��
unittest.mockrr>r�test.supportrr�zipfilerrrr	rKrIrWrErn�	tracebackr
rrr�r�r�r�r�rkrr'rwr�r�r�r�r�r�r�r�r&r�r�r�r�cache_from_source�pyc_filer��TestCaser2rG�
requires_zlibr�r�r�rB�mainrEr r�<module>r�s���
�	����
������&�"�>�>�����	�9�9������(�G�V�
,��/�	��%��d�i�i�k���G�S�#�h�-�0�����������	��	�
�7�7�?�?�;�'��
�7�7�?�?�?�+���>�>�+�+�G�e�O�<��
��<�h�/�/�<�"^
K�$;�^
K�B������"?����O3�x�0�0�O3�d��z���H�M�M�O���i���D��s�&E0�0E;�:E;

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