| Current Path : /usr/local/lib/python3.11/distutils/tests/__pycache__/ |
| Current File : //usr/local/lib/python3.11/distutils/tests/__pycache__/test_install_lib.cpython-311.pyc |
�
SԚg% � �� � d Z ddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZ G d� d ej ej ej ej � � Zed
k r ej � � dS dS )z)Tests for distutils.command.install_data.� N)�install_lib)� Extension)�support)�DistutilsOptionError)�requires_subprocessc � � e Zd Zd� Z ej ej d� � e� � d� � � � � Z d� Z
d� Z e� � d� � � ZdS )�InstallLibTestCasec �� � | � � � d }t |� � }|� � � | � |j d� � | � |j d� � d|_ | � t |j � � d|_ | � t |j � � d|_ |� � � | � |j d� � d S )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_options s� � ����!�!�!�$���$���������������a�(�(�(������q�)�)�)� ������.��0D�E�E�E�������.��0D�E�E�E���������������q�)�)�)�)�)� zbyte-compile disabledc � � | � � � \ }}t j |� � t |� � }dx|_ |_ t j � |d� � }| � |d� � |� |g� � t j � dd�� � }t j � d|j �� � }| �
t j � |� � � � | �
t j � |� � � � d S )Nr zfoo.pyz
# python file� )�optimization)r �os�chdirr r r �path�join�
write_file�byte_compile� importlib�util�cache_from_source�
assertTrue�exists)r �project_dirr r �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�5r c � � | � � � \ }}t j |� � t j d� � t |� � }dx|_ |_ | � � � |_ t j �
|dd� � }| � |d� � t ddg� � g|j
_ dg|j
_ d|j
_ t j �
|dd� � }| � |d � � |� � � }| � t'