Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/distutils/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/distutils/tests/__pycache__/test_install_lib.cpython-38.pyc
U

@��g��@s�dZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZGdd	�d	ejejejej�Zd
d�Zedkr�ee��dS)
z)Tests for distutils.command.install_data.�N)�install_lib)�	Extension)�support)�DistutilsOptionError)�run_unittestc@sBeZdZdd�Ze�ejd�dd��Zdd�Z	dd	�Z
d
d�ZdS)
�InstallLibTestCasecCs�|��d}t|�}|��|�|jd�|�|jd�d|_|�t|j�d|_|�t|j�d|_|��|�|jd�dS)N�r�foo�4�2�)�create_distrZfinalize_options�assertEqual�compile�optimizeZassertRaisesr)�self�dist�cmd�r�?/opt/cppython/lib/python3.8/distutils/tests/test_install_lib.py�test_finalize_optionssz(InstallLibTestCase.test_finalize_optionszbyte-compile disabledcCs�|��\}}t�|�t|�}d|_|_tj�|d�}|�|d�|�	|g�t
jjddd�}t
jjd|jd�}|�
tj�|��|�
tj�|��dS)Nrzfoo.pyz
# python file�)�optimization)r
�os�chdirrrr�path�join�
write_file�byte_compile�	importlib�util�cache_from_sourceZ
assertTrue�exists)r�project_dirrr�fZpyc_fileZpyc_opt_filerrr�test_byte_compile%s
�z$InstallLibTestCase.test_byte_compilecCs�|��\}}t�|�t�d�t|�}d|_|_|��|_tj	�
|dd�}|�|d�tddg�g|j
_dg|j
_d|j
_|��}|�t|�d|�dS)	N�spamr�__init__.py�# python packager	�xxx�setup.py�)r
rr�mkdirrrr�mkdtemp�install_dirrrrr�distribution�ext_modules�packages�script_nameZget_outputsr�len)rr#rrr$Zoutputsrrr�test_get_outputs5s



z#InstallLibTestCase.test_get_outputscCs�|��\}}t�|�t�d�t|�}d|_|_|��|_tj	�
|dd�}|�|d�tddg�g|j
_dg|j
_d|j
_|��}|�t|�d|�dS)	Nr&rr'r(r	r)r*r)r
rrr,rrrr-r.rrrrr/r0r1r2Z
get_inputsrr3)rr#rrr$Zinputsrrr�test_get_inputsIs



z"InstallLibTestCase.test_get_inputscCsl|��d}t|�}d|_d|_tj}dt_z|�g�W5|t_X|�d|jdd|jdd�dS)NrTzbyte-compiling is disabledrr)	r
rrr�sys�dont_write_bytecoderZassertInZlogs)rrrZold_dont_write_bytecoderrr�test_dont_write_bytecode]s�z+InstallLibTestCase.test_dont_write_bytecodeN)�__name__�
__module__�__qualname__r�unittestZskipIfr6r7r%r4r5r8rrrrrs
rcCs
t�t�S)N)r<Z	makeSuiterrrrr�
test_suiteosr=�__main__)�__doc__r6r�importlib.utilrr<Zdistutils.command.install_librZdistutils.extensionrZdistutils.testsrZdistutils.errorsrZtest.supportrZTempdirManagerZLoggingSilencerZEnvironGuardZTestCaserr=r9rrrr�<module>s"�a

F1le Man4ger