Current File : //usr/local/apps/python3/lib/python3.11/distutils/tests/__pycache__/test_bdist_dumb.cpython-311.pyc
�

�Ker���dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZdZ
	ddlZdZn
#e$rd	ZYnwxYwGd
�dejejejej��Zd�Zed
kree����dSdS)z'Tests for distutils.command.bdist_dumb.�N)�run_unittest)�Distribution)�
bdist_dumb)�supportz�from distutils.core import setup
import foo

setup(name='foo', version='0.1', py_modules=['foo'],
      url='xxx', author='xxx', author_email='xxx')

TFc�\��eZdZ�fd�Z�fd�Zejed��d���Z�xZ	S)�BuildDumbTestCasec����tt|�����tj��|_tjtjdd�f|_dS�N)	�superr�setUp�os�getcwd�old_location�sys�argv�old_sys_argv��self�	__class__s ��I/usr/local/apps/python3/lib/python3.11/distutils/tests/test_bdist_dumb.pyrzBuildDumbTestCase.setUp"sM���
���&�&�,�,�.�.�.��I�K�K����H�c�h�q�q�q�k�1�����c����tj|j��|jdt_|jdtjdd�<t
t|�����dS)Nr�)	r
�chdirrrrrrr�tearDownrs �rrzBuildDumbTestCase.tearDown's_���
���"�#�#�#��$�Q�'����'��*�������
���&�&�/�/�1�1�1�1�1rzNeed zlib support to runc	�f�|���}tj�|d��}tj|��|�|dft��|�|dfd��|�|dfd��|�|dfd��tdd	dgd
d
d
d���}d|_tj	|��dgt_t|��}d|_
|���|���tjtj�|d
����}|����d|j�d�}|�||g��t)jtj�d
|����}	|���}|���n#|���wxYwt1t3dt5tjj|������}dtjdd�zdg}	tjs'|	�dtjj z��|�|t1|	����dS)N�foozsetup.pyzfoo.py�#zMANIFEST.inzinclude foo.py�README�z0.1�xxx)�name�version�
py_modules�url�author�author_email�zip�dist�.z.zipzfoo-0.1-py%s.%s.egg-info�z
foo.%s.pyc)!�mkdtempr
�path�join�mkdir�
write_file�SETUP_PYr�script_namerrrr�format�ensure_finalized�run�listdir�get_fullname�	plat_name�assertEqual�zipfile�ZipFile�namelist�close�sorted�filter�map�basename�version_info�dont_write_bytecode�append�implementation�	cache_tag)
r�tmp_dir�pkg_dirr)�cmd�dist_created�base�fp�contents�wanteds
          r�test_simple_builtz#BuildDumbTestCase.test_simple_built-sX���,�,�.�.���'�,�,�w��.�.��
����������*�-�x�8�8�8�����(�+�S�1�1�1�����-�0�2B�C�C�C�����(�+�R�0�0�0��U�u�,1�7�$)�U�-2�4�4�5�5��&���
�������<����������
����������	�	�	��z�"�'�,�,�w��"?�"?�@�@��"�/�/�1�1�1�1�3�=�=�=�A�������v�.�.�.��_�R�W�\�\�&�$�7�7�
8�
8��	��{�{�}�}�H��H�H�J�J�J�J��B�H�H�J�J�J�J�����&��s�2�7�+;�X�'F�'F�G�G�H�H��,�s�/?����/C�C�X�N���&�	G��M�M�,��);�)E�E�F�F�F�����6�&�>�>�2�2�2�2�2s�G/�/H)
�__name__�
__module__�__qualname__rr�unittest�
skipUnless�ZLIB_SUPPORTrO�
__classcell__)rs@rrrs~�������
2�2�2�2�2�
2�2�2�2�2��X���'A�B�B�-3�-3�C�B�-3�-3�-3�-3�-3rrc�X�tj���t��Sr
)rS�
TestLoader�loadTestsFromTestCaser�rr�
test_suiter[]s ���� � �6�6�7H�I�I�Ir�__main__)�__doc__r
rr:rS�test.supportr�distutils.corer�distutils.command.bdist_dumbr�distutils.testsrr1�zlibrU�ImportError�TempdirManager�LoggingSilencer�EnvironGuard�TestCaserr[rPrZrr�<module>rhs:��-�-�	�	�	�	�
�
�
�
���������%�%�%�%�%�%�'�'�'�'�'�'�3�3�3�3�3�3�#�#�#�#�#�#�����K�K�K��L�L�������L�L�L�����>3�>3�>3�>3�>3��.��/��,� �)�>3�>3�>3�@J�J�J��z����L�����������s�5�?�?