HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/distutils/tests/__pycache__/test_install_lib.cpython-37.opt-2.pyc
B

!��g��@s�ddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZGdd�de
je
je
jej�Zd	d
�Zedkr�ee��dS)�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�</usr/local/lib/python3.7/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�spamrz__init__.pyz# python packager	�xxxzsetup.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&rz__init__.pyz# python packager	r'zsetup.pyr)r
rrr)rrrr*r+rrrrr,r-r.r/Z
get_inputsrr0)rr#rrr$Zinputsrrr�test_get_inputsIs



z"InstallLibTestCase.test_get_inputscCsl|��d}t|�}d|_d|_tj}dt_z|�g�Wd|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�unittestZskipIfr3r4r%r1r2r5rrrrrs
rcCs
t�t�S)N)r9Z	makeSuiterrrrr�
test_suiteosr:�__main__)r3r�importlib.utilrr9Zdistutils.command.install_librZdistutils.extensionrZdistutils.testsrZdistutils.errorsrZtest.supportrZTempdirManagerZLoggingSilencerZEnvironGuardZTestCaserr:r6rrrr�<module>s^