Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.11/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.11/distutils/tests/__pycache__/test_install_lib.cpython-311.pyc

�

SԚg%����dZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZGd�d	ejejejej��Zed
krej��dSdS)z)Tests for distutils.command.install_data.�N)�install_lib)�	Extension)�support)�DistutilsOptionError)�requires_subprocessc��eZdZd�Zejejd��e��d�����Z	d�Z
d�Ze��d���ZdS)�InstallLibTestCasec���|���d}t|��}|���|�|jd��|�|jd��d|_|�t|j��d|_|�t|j��d|_|���|�|jd��dS)N�r�foo�4�2�)�create_distr�finalize_options�assertEqual�compile�optimize�assertRaisesr)�self�dist�cmds   �=/usr/local/lib/python3.11/distutils/tests/test_install_lib.py�test_finalize_optionsz(InstallLibTestCase.test_finalize_optionss������!�!�!�$���$���������������a�(�(�(������q�)�)�)�������.��0D�E�E�E�������.��0D�E�E�E���������������q�)�)�)�)�)�zbyte-compile disabledc��|���\}}tj|��t|��}dx|_|_tj�|d��}|�|d��|�	|g��tj�dd���}tj�d|j���}|�
tj�|����|�
tj�|����dS)Nrzfoo.pyz
# python file�)�optimization)r�os�chdirrrr�path�join�
write_file�byte_compile�	importlib�util�cache_from_source�
assertTrue�exists)r�project_dirrr�f�pyc_file�pyc_opt_files       r�test_byte_compilez$InstallLibTestCase.test_byte_compile%s	��!�,�,�.�.���T�
�������$����%&�&���c�l��G�L�L��h�/�/������?�+�+�+����!������>�3�3�H�2�3�N�N�� �~�7�7��AD��8�O�O���������x�0�0�1�1�1��������|�4�4�5�5�5�5�5rc��|���\}}tj|��tjd��t	|��}dx|_|_|���|_tj	�
|dd��}|�|d��tddg��g|j
_dg|j
_d|j
_tj	�
|dd��}|�|d	��|���}|�t'|��d
|��dS)N�spamr�__init__.py�# python packager�xxx�setup.pyz
rubbish.pyz	rubbish()�)rrr �mkdirrrr�mkdtemp�install_dirr!r"r#r�distribution�ext_modules�packages�script_name�get_outputsr�len)rr*rrr+�outputss      r�test_get_outputsz#InstallLibTestCase.test_get_outputs6s$�� �,�,�.�.���T�
������
�������$����&'�&���c�l��,�,�.�.����G�L�L��f�m�<�<������-�.�.�.�(1�%�%��(A�(A�'B���$�%+�H���!�'1���$�
�G�L�L��f�l�;�;������;�'�'�'��/�/�#�#������W���q�'�2�2�2�2�2rc�8�|���\}}tj|��tjd��t	|��}dx|_|_|���|_tj	�
|dd��}|�|d��tddg��g|j
_dg|j
_d|j
_|���}|�t'|��d|��dS)	Nr0rr1r2rr3r4r)rrr r6rrrr7r8r!r"r#rr9r:r;r<�
get_inputsrr>)rr*rrr+�inputss      r�test_get_inputsz"InstallLibTestCase.test_get_inputsNs��� �,�,�.�.���T�
������
�������$����&'�&���c�l��,�,�.�.����G�L�L��f�m�<�<������-�.�.�.�(1�%�%��(A�(A�'B���$�%+�H���!�'1���$����!�!������V���a��0�0�0�0�0rc��|���d}t|��}d|_d|_tj}dt_	|�g��|t_n#|t_wxYw|�d|jdd|jddz��dS)NrTzbyte-compiling is disabledrr)	rrrr�sys�dont_write_bytecoder$�assertIn�logs)rrr�old_dont_write_bytecodes    r�test_dont_write_bytecodez+InstallLibTestCase.test_dont_write_bytecodebs������!�!�!�$���$����������"%�"9��"&���	>����R� � � �&=�C�#�#��&=�C�#�=�=�=�=��
�
�2��i��l�1�o��	�!��Q��7�	9�	9�	9�	9�	9s�A3�3BN)
�__name__�
__module__�__qualname__r�unittest�skipIfrFrGrr.r@rDrK�rrr	r	s�������
*�*�*�$�X�_�S�,�.E�F�F�����
6�
6���G�F�
6�3�3�3�01�1�1�(����9�9���9�9�9rr	�__main__)�__doc__rFr�importlib.utilr%rO�distutils.command.install_libr�distutils.extensionr�distutils.testsr�distutils.errorsr�test.supportr�TempdirManager�LoggingSilencer�EnvironGuard�TestCaser	rL�mainrQrr�<module>r_s���/�/�
�
�
�
�	�	�	�	���������5�5�5�5�5�5�)�)�)�)�)�)�#�#�#�#�#�#�1�1�1�1�1�1�,�,�,�,�,�,�d9�d9�d9�d9�d9��/� �0� �-�!�*�d9�d9�d9�N�z����H�M�O�O�O�O�O��r

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