HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/distutils/tests/__pycache__/test_install_lib.cpython-311.opt-1.pyc
�

��Vc_����dZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZGd�d	ejejejej��Zd
�Zedkree����dSdS)z)Tests for distutils.command.install_data.�N)�install_lib)�	Extension)�support)�DistutilsOptionError)�run_unittest�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   �4D:\Python311\Lib\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)Nrzfoo.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�8�|���\}}tj|��tjd��t	|��}dx|_|_|���|_tj	�
|dd��}|�|d��tddg��g|j
_dg|j
_d|j
_|���}|�t'|��d|��dS)	N�spamr�__init__.py�# python packager
�xxx�setup.py�)rr r!�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���$��/�/�#�#������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)	Nr1rr2r3r
r4r5r)rr r!r7rrrr8r9r"r#r$rr:r;r<r=�
get_inputsrr?)rr+rrr,�inputss      r�test_get_inputsz"InstallLibTestCase.test_get_inputsJs��� �,�,�.�.���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)NrTzbyte-compiling is disabledrr)	rrrr�sys�dont_write_bytecoder%�assertIn�logs)rrr�old_dont_write_bytecodes    r�test_dont_write_bytecodez+InstallLibTestCase.test_dont_write_bytecode^s������!�!�!�$���$����������"%�"9��"&���	>����R� � � �&=�C�#�#��&=�C�#�=�=�=�=��
�
�2��i��l�1�o��	�!��Q��7�	9�	9�	9�	9�	9s�A3�3BN)
�__name__�
__module__�__qualname__r�unittest�skipIfrGrHrr/rArErL�rrr
r
s�������
*�*�*�$�X�_�S�,�.E�F�F�����
6�
6���G�F�
6�3�3�3�(1�1�1�(����9�9���9�9�9rr
c�X�tj���t��S)N)rP�
TestLoader�loadTestsFromTestCaser
rRrr�
test_suiterVqs ���� � �6�6�7I�J�J�Jr�__main__)�__doc__rGr �importlib.utilr&rP�distutils.command.install_libr�distutils.extensionr�distutils.testsr�distutils.errorsr�test.supportrr�TempdirManager�LoggingSilencer�EnvironGuard�TestCaser
rVrMrRrr�<module>rcs!��/�/�
�
�
�
�	�	�	�	���������5�5�5�5�5�5�)�)�)�)�)�)�#�#�#�#�#�#�1�1�1�1�1�1�:�:�:�:�:�:�:�:�`9�`9�`9�`9�`9��/� �0� �-�!�*�`9�`9�`9�FK�K�K��z����L�����������r